Index: trunk/src/kernel32/hmcomm.cpp
===================================================================
--- trunk/src/kernel32/hmcomm.cpp	(revision 7300)
+++ trunk/src/kernel32/hmcomm.cpp	(revision 7301)
@@ -1,3 +1,3 @@
-/* $Id: hmcomm.cpp,v 1.12 2001-11-08 14:49:27 phaller Exp $ */
+/* $Id: hmcomm.cpp,v 1.13 2001-11-08 15:38:42 phaller Exp $ */
 
 /*
@@ -967,7 +967,4 @@
   memcpy(lpCC,&pDevData->CommCfg,sizeof(COMMCONFIG));
   *lpdwSize = sizeof(COMMCONFIG);
-  return(TRUE);
-
-
   return(TRUE);
 }
Index: trunk/src/kernel32/hmparport.cpp
===================================================================
--- trunk/src/kernel32/hmparport.cpp	(revision 7300)
+++ trunk/src/kernel32/hmparport.cpp	(revision 7301)
@@ -1,3 +1,3 @@
-/* $Id: hmparport.cpp,v 1.2 2001-11-08 15:10:39 phaller Exp $ */
+/* $Id: hmparport.cpp,v 1.3 2001-11-08 15:38:43 phaller Exp $ */
 
 /*
@@ -92,4 +92,5 @@
   ULONG ulMagic;
   // Win32 Device Control Block
+  COMMCONFIG   CommCfg;
   //OS/2 Device Control Block
 } HMDEVPARPORTDATA, *PHMDEVPARPORTDATA;
@@ -103,4 +104,7 @@
     memset(pData,0,sizeof(HMDEVPARPORTDATA));
     pData->ulMagic = MAGIC_PARPORT;
+    pData->CommCfg.dwSize   = sizeof(COMMCONFIG);
+    pData->CommCfg.wVersion = 1;
+    pData->CommCfg.dwProviderSubType = PST_PARALLELPORT;
   }
   return pData;
@@ -554,2 +558,119 @@
   return(rc==0);
 }
+
+
+BOOL HMDeviceParPortClass::DeviceIoControl(PHMHANDLEDATA pHMHandleData, DWORD dwIoControlCode,
+                             LPVOID lpInBuffer, DWORD nInBufferSize,
+                             LPVOID lpOutBuffer, DWORD nOutBufferSize,
+                             LPDWORD lpBytesReturned, LPOVERLAPPED lpOverlapped)
+{
+#ifdef DEBUG
+    char *msg = NULL;
+
+    switch(dwIoControlCode)
+    {
+/**
+    case IOCTL_DISK_FORMAT_TRACKS:
+        msg = "IOCTL_DISK_FORMAT_TRACKS";
+        break;
+*/
+    }
+  
+    if(msg) {
+        dprintf(("HMDeviceParPortClass::DeviceIoControl %s %x %d %x %d %x %x", msg, lpInBuffer, nInBufferSize,
+                 lpOutBuffer, nOutBufferSize, lpBytesReturned, lpOverlapped));
+    }
+#endif
+
+    switch(dwIoControlCode)
+    {
+//    case IOCTL_SCSI_RESCAN_BUS:
+//        break;
+
+    }
+    dprintf(("HMDeviceParPortClass::DeviceIoControl: unimplemented dwIoControlCode=%08lx\n", dwIoControlCode));
+    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    return FALSE;
+}
+
+
+BOOL HMDeviceParPortClass::SetDefaultCommConfig( PHMHANDLEDATA pHMHandleData,
+                                                LPCOMMCONFIG lpCC,
+                                                DWORD dwSize)
+{
+  PHMDEVPARPORTDATA pDevData = (PHMDEVPARPORTDATA)pHMHandleData->lpDeviceData;
+  if((NULL==pDevData) || (pDevData->ulMagic != MAGIC_PARPORT) )
+  {
+    SetLastError(ERROR_INVALID_HANDLE);
+    return FALSE;
+  }
+  memset(&pDevData->CommCfg,0, sizeof(COMMCONFIG));
+  memcpy(&pDevData->CommCfg,lpCC,dwSize>sizeof(COMMCONFIG)?sizeof(COMMCONFIG):dwSize);
+
+  return(TRUE);
+}
+
+
+BOOL HMDeviceParPortClass::GetDefaultCommConfig( PHMHANDLEDATA pHMHandleData,
+                                                LPCOMMCONFIG lpCC,
+                                                LPDWORD lpdwSize)
+{
+  PHMDEVPARPORTDATA pDevData = (PHMDEVPARPORTDATA)pHMHandleData->lpDeviceData;
+
+  if( O32_IsBadWritePtr(lpCC,sizeof(COMMCONFIG)) ||
+      *lpdwSize< sizeof(COMMCONFIG) )
+  {
+    SetLastError(ERROR_INSUFFICIENT_BUFFER);
+    *lpdwSize= sizeof(COMMCONFIG);
+    return FALSE;
+  }
+
+  if((NULL==pDevData) || (pDevData->ulMagic != MAGIC_PARPORT) )
+  {
+    SetLastError(ERROR_INVALID_HANDLE);
+    return FALSE;
+  }
+
+  memcpy(lpCC,&pDevData->CommCfg,sizeof(COMMCONFIG));
+  *lpdwSize = sizeof(COMMCONFIG);
+  return(TRUE);
+}
+
+
+BOOL HMDeviceParPortClass::SetCommConfig( PHMHANDLEDATA pHMHandleData,
+                                         LPCOMMCONFIG lpCC,
+                                         DWORD dwSize )
+{
+  dprintf(("HMDeviceParPortClass::SetCommConfig not implemented"));
+
+
+  return(TRUE);
+}
+
+
+BOOL HMDeviceParPortClass::GetCommConfig( PHMHANDLEDATA pHMHandleData,
+                                         LPCOMMCONFIG lpCC,
+                                         LPDWORD lpdwSize )
+{
+  PHMDEVPARPORTDATA pDevData = (PHMDEVPARPORTDATA)pHMHandleData->lpHandlerData;
+
+  dprintf(("HMDeviceParPortClass::GetCommConfig"));
+
+  if( O32_IsBadWritePtr(lpCC,sizeof(COMMCONFIG)) ||
+      *lpdwSize< sizeof(COMMCONFIG) )
+  {
+    SetLastError(ERROR_INSUFFICIENT_BUFFER);
+    *lpdwSize= sizeof(COMMCONFIG);
+    return FALSE;
+  }
+
+  if((NULL==pDevData) || (pDevData->ulMagic != MAGIC_PARPORT) )
+  {
+    SetLastError(ERROR_INVALID_HANDLE);
+    return FALSE;
+  }
+
+  memcpy(lpCC,&pDevData->CommCfg,sizeof(COMMCONFIG));
+  *lpdwSize = sizeof(COMMCONFIG);
+  return(TRUE);
+}
Index: trunk/src/kernel32/hmparport.h
===================================================================
--- trunk/src/kernel32/hmparport.h	(revision 7300)
+++ trunk/src/kernel32/hmparport.h	(revision 7301)
@@ -1,3 +1,3 @@
-/* $Id: hmparport.h,v 1.2 2001-11-08 15:10:38 phaller Exp $ */
+/* $Id: hmparport.h,v 1.3 2001-11-08 15:38:42 phaller Exp $ */
 
 /*
@@ -38,4 +38,27 @@
                                LPCOMSTAT lpcst);
   
+  virtual BOOL SetCommConfig( PHMHANDLEDATA pHMHandleData,
+                              LPCOMMCONFIG lpCC,
+                              DWORD dwSize );
+  
+  virtual BOOL GetCommConfig( PHMHANDLEDATA pHMHandleData,
+                              LPCOMMCONFIG lpCC,
+                              LPDWORD lpdwSize );
+  
+  virtual BOOL SetDefaultCommConfig( PHMHANDLEDATA pHMHandleData,
+                                     LPCOMMCONFIG lpCC,
+                                     DWORD dwSize);
+  
+  virtual BOOL GetDefaultCommConfig( PHMHANDLEDATA pHMHandleData,
+                                     LPCOMMCONFIG lpCC,
+                                     LPDWORD lpdwSize);
+  
+  /* this is a handler method for calls to DeviceIoControl() */
+  virtual BOOL   DeviceIoControl    (PHMHANDLEDATA pHMHandleData, DWORD dwIoControlCode,
+                                     LPVOID lpInBuffer, DWORD nInBufferSize,
+                                     LPVOID lpOutBuffer, DWORD nOutBufferSize,
+                                     LPDWORD lpBytesReturned, LPOVERLAPPED lpOverlapped);
+  
+  
                            /* this is a handler method for calls to ReadFile() */
   virtual BOOL   ReadFile   (PHMHANDLEDATA pHMHandleData,
