Index: trunk/src/makefile
===================================================================
--- trunk/src/makefile	(revision 701)
+++ trunk/src/makefile	(revision 703)
@@ -1,3 +1,3 @@
-# $Id: makefile,v 1.8 1999-08-22 22:12:46 sandervl Exp $
+# $Id: makefile,v 1.9 1999-08-25 22:37:58 sandervl Exp $
 
 #
@@ -68,4 +68,6 @@
         cd ..\oleaut32
         $(MAKE_CMD)
+        cd ..\olesvr32
+        $(MAKE_CMD)
         cd ..\dsound
         $(MAKE_CMD)
@@ -91,4 +93,6 @@
         $(MAKE_CMD) clean
         cd ..\oleaut32
+        $(MAKE_CMD) clean
+        cd ..\olesvr32
         $(MAKE_CMD) clean
         cd ..\capi2032
Index: trunk/src/olesvr32/initterm.cpp
===================================================================
--- trunk/src/olesvr32/initterm.cpp	(revision 703)
+++ trunk/src/olesvr32/initterm.cpp	(revision 703)
@@ -0,0 +1,104 @@
+/* $Id: initterm.cpp,v 1.1 1999-08-25 22:38:49 sandervl Exp $ */
+
+/*
+ * DLL entry point
+ *
+ * Copyright 1998 Sander van Leeuwen
+ * Copyright 1998 Peter Fitzsimmons
+ *
+ *
+ * Project Odin Software License can be found in LICENSE.TXT
+ *
+ */
+
+/*-------------------------------------------------------------*/
+/* INITERM.C -- Source for a custom dynamic link library       */
+/*              initialization and termination (_DLL_InitTerm) */
+/*              function.                                      */
+/*                                                             */
+/* When called to perform initialization, this sample function */
+/* gets storage for an array of integers, and initializes its  */
+/* elements with random integers.  At termination time, it     */
+/* frees the array.  Substitute your own special processing.   */
+/*-------------------------------------------------------------*/
+
+
+/* Include files */
+#define  INCL_DOSMODULEMGR
+#define  INCL_DOSPROCESS
+#include <os2wrap.h>    //Odin32 OS/2 api wrappers
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <odin.h>
+#include <misc.h>       /*PLF Wed  98-03-18 23:18:15*/
+
+extern "C" {
+void CDECL _ctordtorInit( void );
+void CDECL _ctordtorTerm( void );
+}
+
+/*-------------------------------------------------------------------*/
+/* A clean up routine registered with DosExitList must be used if    */
+/* runtime calls are required and the runtime is dynamically linked. */
+/* This will guarantee that this clean up routine is run before the  */
+/* library DLL is terminated.                                        */
+/*-------------------------------------------------------------------*/
+static void APIENTRY cleanup(ULONG reason);
+
+
+/****************************************************************************/
+/* _DLL_InitTerm is the function that gets called by the operating system   */
+/* loader when it loads and frees this DLL for each process that accesses   */
+/* this DLL.  However, it only gets called the first time the DLL is loaded */
+/* and the last time it is freed for a particular process.  The system      */
+/* linkage convention MUST be used because the operating system loader is   */
+/* calling this function.                                                   */
+/****************************************************************************/
+unsigned long SYSTEM _DLL_InitTerm(unsigned long hModule, unsigned long
+                                   ulFlag)
+{
+   size_t i;
+   APIRET rc;
+
+   /*-------------------------------------------------------------------------*/
+   /* If ulFlag is zero then the DLL is being loaded so initialization should */
+   /* be performed.  If ulFlag is 1 then the DLL is being freed so            */
+   /* termination should be performed.                                        */
+   /*-------------------------------------------------------------------------*/
+
+   switch (ulFlag) {
+      case 0 :
+         _ctordtorInit();
+
+         CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed  98-03-18 05:28:48*/
+
+         /*******************************************************************/
+         /* A DosExitList routine must be used to clean up if runtime calls */
+         /* are required and the runtime is dynamically linked.             */
+         /*******************************************************************/
+
+         rc = DosExitList(0x0000F000|EXLST_ADD, cleanup);
+         if(rc)
+                return 0UL;
+
+         break;
+      case 1 :
+         break;
+      default  :
+         return 0UL;
+   }
+
+   /***********************************************************/
+   /* A non-zero value must be returned to indicate success.  */
+   /***********************************************************/
+   return 1UL;
+}
+
+
+static void APIENTRY cleanup(ULONG ulReason)
+{
+   _ctordtorTerm();
+   DosExitList(EXLST_EXIT, cleanup);
+   return ;
+}
Index: trunk/src/olesvr32/makefile
===================================================================
--- trunk/src/olesvr32/makefile	(revision 703)
+++ trunk/src/olesvr32/makefile	(revision 703)
@@ -0,0 +1,51 @@
+# $Id: makefile,v 1.1 1999-08-25 22:38:49 sandervl Exp $
+
+#
+# PD-Win32 API
+#
+#	olesvr32.dll makefile
+#
+
+PDWIN32_INCLUDE = ..\..\include
+PDWIN32_LIB = ..\..\lib
+PDWIN32_BIN = ..\..\bin
+
+
+!include $(PDWIN32_INCLUDE)/pdwin32.mk
+
+
+CFLAGS = $(CFLAGS) -I$(PDWIN32_INCLUDE) /DNONAMELESSUNION
+CXXFLAGS = $(CXXFLAGS) -I$(PDWIN32_INCLUDE) /DNONAMELESSUNION
+
+
+TARGET = olesvr32
+
+OBJS =  olesvr32.obj initterm.obj
+
+all: $(TARGET).dll $(TARGET).lib
+
+
+$(TARGET).dll: $(OBJS) $(TARGET).def
+	$(LD) $(LDFLAGS) -Fm -Fe$@ $(OBJS) $(TARGET).def \
+              $(PDWIN32_LIB)/pmwinx.lib $(PDWIN32_LIB)/kernel32.lib \
+              $(PDWIN32_LIB)/odincrt.lib OS2386.LIB $(RTLLIB_O)
+	$(CP) $@ $(PDWIN32_BIN)
+
+
+$(TARGET).lib: $(TARGET).dll
+	$(IMPLIB) $(IMPLIBFLAGS) $@ $(TARGET).dll
+	$(CP) $@ $(PDWIN32_LIB)
+
+
+initterm.obj: initterm.cpp
+olesvr32.obj: olesvr32.cpp
+
+clean:
+	$(RM) *.obj *.lib *.dll *~ *.map *.pch	
+	$(RM) $(PDWIN32_BIN)\$(TARGET).dll
+	$(RM) $(PDWIN32_LIB)\$(TARGET).lib
+
+
+
+
+
Index: trunk/src/olesvr32/olesvr32.cpp
===================================================================
--- trunk/src/olesvr32/olesvr32.cpp	(revision 703)
+++ trunk/src/olesvr32/olesvr32.cpp	(revision 703)
@@ -0,0 +1,126 @@
+/*
+ *	OLESVR32 library
+ *
+ *	Copyright 1995	Martin von Loewis
+ *	Copyright 1999  Jens Wiessner
+ */
+
+/*	At the moment, these are only empty stubs.
+ */
+
+#include <os2win.h>
+#include <ole.h>
+#include "olesvr32.h"
+#include "debugtools.h"
+#include <debugdefs.h>
+
+DEFAULT_DEBUG_CHANNEL(ole)
+
+/******************************************************************************
+ * OleRegisterServer32 [OLESVR32.2]
+ */
+OLESTATUS WINAPI OleRegisterServer(LPCSTR svrname,LPOLESERVER olesvr,LHSERVER* hRet,HINSTANCE hinst,OLE_SERVER_USE osu) {
+	FIXME("(%s,%p,%p,%08x,%d): stub!\n",svrname,olesvr,hRet,hinst,osu);
+    	*hRet=++OLE_current_handle;
+	return OLE_OK;
+}
+
+/******************************************************************************
+ *		OleRevokeServer32	[OLESVR32.3]
+ */
+OLESTATUS WINAPI OleRevokeServer(LHSERVER hServer)
+{
+    FIXME("%ld - stub\n",hServer);
+    return OLE_OK;
+}
+
+/******************************************************************************
+ *		OleBlockServer32	[OLESVR32.4]
+ */
+OLESTATUS WINAPI OleBlockServer(LHSERVER hServer)
+{
+    FIXME("(%ld): stub\n",hServer);
+    return OLE_OK;
+}
+
+
+/******************************************************************************
+ *		OleUnblockServer32	[OLESVR32.5]
+ */
+OLESTATUS WINAPI OleUnblockServer(LHSERVER hServer, BOOL *block)
+{
+    FIXME("(%ld): stub\n",hServer);
+    /* no more blocked messages :) */
+    *block=FALSE;
+    return OLE_OK;
+}
+
+/******************************************************************************
+ * OleRegisterServerDoc32 [OLESVR32.6]
+ */
+INT WINAPI OleRegisterServerDoc( LHSERVER hServer, LPCSTR docname,
+                                         LPOLESERVERDOC document,
+                                         LHSERVERDOC *hRet)
+{
+    FIXME("(%ld,%s): stub\n", hServer, docname);
+    *hRet=++OLE_current_handle;
+    return OLE_OK;
+}
+
+/******************************************************************************
+ *		OleRevokeServerDoc32	[OLESVR32.7]
+ */
+OLESTATUS WINAPI OleRevokeServerDoc(LHSERVERDOC hServerDoc)
+{
+    FIXME("(%ld): stub\n",hServerDoc);
+    return OLE_OK;
+}
+
+/******************************************************************************
+ *		OleRenameServerDoc32	[OLESVR32.8]
+ *
+ */
+OLESTATUS WINAPI OleRenameServerDoc(LHSERVERDOC hDoc, LPCSTR newName)
+{
+    FIXME("(%ld,%s): stub.\n",hDoc, newName);
+    return OLE_OK;
+}
+
+/******************************************************************************
+ *		OleRevertServerDoc	[OLESVR32.9]
+ *
+ */
+OLESTATUS   WINAPI  OleRevertServerDoc(LHSERVERDOC hDoc)
+{
+    FIXME("(%ld): stub\n",hDoc);
+    return OLE_OK;
+}
+
+/******************************************************************************
+ *		OleSavedServerDoc	[OLESVR32.10]
+ *
+ */
+OLESTATUS   WINAPI  OleSavedServerDoc(LHSERVERDOC hDoc)
+{
+    FIXME("(%ld): stub\n",hDoc);
+    return OLE_OK;
+}
+
+/******************************************************************************
+ *		OleRevokeObject		[OLESVR32.11]
+ *
+ */
+OLESTATUS   WINAPI  OleRevokeObject(LPOLECLIENT oClient)
+{
+    FIXME("(%ld): stub\n",oClient);
+    return OLE_OK;
+}
+
+/******************************************************************************
+ *		OleQueryServerVersion	[OLESVR32.12]
+ *
+ */
+DWORD       WINAPI  OleQueryServerVersion(void)
+{
+    return OLE_OK;
+}
Index: trunk/src/olesvr32/olesvr32.def
===================================================================
--- trunk/src/olesvr32/olesvr32.def	(revision 703)
+++ trunk/src/olesvr32/olesvr32.def	(revision 703)
@@ -0,0 +1,18 @@
+; $Id: olesvr32.def,v 1.1 1999-08-25 22:38:49 sandervl Exp $
+
+;Created by BLAST for IBM's compiler
+LIBRARY OLESVR32 INITINSTANCE
+DATA MULTIPLE NONSHARED
+
+EXPORTS
+    OleRegisterServer		= _OleRegisterServer@20		@2
+    OleRevokeServer		= _OleRevokeServer@4		@3
+    OleBlockServer		= _OleBlockServer@4		@4
+    OleUnblockServer		= _OleUnblockServer@8		@5
+    OleRegisterServerDoc	= _OleRegisterServerDoc@16	@6
+    OleRevokeServerDoc		= _OleRevokeServerDoc@4		@7
+    OleRenameServerDoc		= _OleRenameServerDoc@8		@8
+    OleRevertServerDoc		= _OleRevertServerDoc@4		@9
+    OleSavedServerDoc		= _OleSavedServerDoc@4		@10
+    OleRevokeObject		= _OleRevokeObject@4		@11
+    OleQueryServerVersion	= _OleQueryServerVersion@0	@12
Index: trunk/src/olesvr32/olesvr32.h
===================================================================
--- trunk/src/olesvr32/olesvr32.h	(revision 703)
+++ trunk/src/olesvr32/olesvr32.h	(revision 703)
@@ -0,0 +1,11 @@
+/* Definitions for the OLE Server32 DLL (OLESVR32.DLL)
+ *
+ * Copyright 1999 Jens Wiessner
+ */
+
+#ifndef __ODIN_OLESVR32_H
+#define __ODIN_OLESVR32_H
+
+LONG	OLE_current_handle;
+
+#endif /* __ODIN_OLESVR32_H */
