Index: trunk/src/shlwapi/ordinal.cpp
===================================================================
--- trunk/src/shlwapi/ordinal.cpp	(revision 3687)
+++ trunk/src/shlwapi/ordinal.cpp	(revision 3688)
@@ -1,3 +1,3 @@
-/* $Id: ordinal.cpp,v 1.2 2000-06-12 08:09:37 phaller Exp $ */
+/* $Id: ordinal.cpp,v 1.3 2000-06-12 11:35:13 phaller Exp $ */
 
 /*
@@ -916,4 +916,130 @@
 
 
+/*****************************************************************************
+ * Name      : SHLWAPI_185
+ * Purpose   : some M$ nag screen ?
+ * Parameters: 
+ * Variables :
+ * Result    : 
+ * Remark    : SHLWAPI.185
+ * Status    : UNTESTED
+ *
+ * Author    : Patrick Haller [Sun, 2000/06/10 04:02]
+ *****************************************************************************/
+
+ODINFUNCTION6(DWORD,   SHLWAPI_185,
+              DWORD, arg0,
+              LPSTR, lpStr1,
+              LPSTR, lpStr2,
+              DWORD, arg3,
+              DWORD, dwDefault,
+              LPSTR, lpstrValueName)
+{
+  BOOL  fDontShow;
+  WCHAR szValueNameW[256];
+  
+  fDontShow = SHRegGetBoolUSValueA("Software\\Microsoft\\Windows\\CurrentVersion\\"
+                                   "Explorer\\DontShowMeThisDialogAgain",
+                                   lpstrValueName,
+                                   0,
+                                   1);
+  if (fDontShow == FALSE)
+    return dwDefault;
+  
+  int iLength1 = lstrlenA(lpStr1)+1;
+  HLOCAL hLocal1 = LocalAlloc(LMEM_ZEROINIT,
+                              iLength1 << 1);
+  if (hLocal1 == NULL)
+    return dwDefault;
+  
+  int iLength2 = lstrlenA(lpStr2)+1;
+  HLOCAL hLocal2 = LocalAlloc(LMEM_ZEROINIT,
+                              iLength2 << 1);
+  if (hLocal2 == NULL)
+  {
+    LocalFree(hLocal1);
+    return dwDefault;
+  }
+  
+#if 0
+  // convert all ascii values to Unicode
+  SHLWAPI_215(lpStr1, (LPWSTR)hLocal1, iLength1);
+  SHLWAPI_215(lpStr2, (LPWSTR)hLocal2, iLength2);
+  SHLWAPI_215(lpstrValueName,  szValueNameW, 256);
+  
+  // do something
+  dwDefault = SHLWAPI_191(arg0,
+              (LPWSTR)hLocal1,
+              arg3,
+              dwDefault,
+              szValueNameW);
+#endif
+  
+  if (hLocal1)
+    LocalFree(hLocal1);
+  
+  if (hLocal2)
+    LocalFree(hLocal2);
+  
+  return dwDefault;
+}
+
+
+/*****************************************************************************
+ * Name      : SHLWAPI_191
+ * Purpose   : display some M$ nag screen if enabled
+ * Parameters: 
+ * Variables :
+ * Result    : 
+ * Remark    : SHLWAPI.191
+ * Status    : UNTESTED
+ *
+ * Author    : Patrick Haller [Sun, 2000/06/10 04:02]
+ *****************************************************************************/
+
+ODINFUNCTION6(DWORD,  SHLWAPI_191,
+              HWND,   hwndParent,
+              DWORD,  arg1,
+              DWORD,  arg2,
+              DWORD,  arg3,
+              DWORD,  dwDefault,
+              LPWSTR, lpstrDialog)
+{
+  BOOL rc = SHRegGetBoolUSValueW((LPCWSTR)L"Software\\Microsoft\\Windows\\CurrentVersion"
+                                 L"\\Explorer\\DontShowMeThisDialogAgain",
+                                 lpstrDialog,
+                                 0,
+                                 1);
+  if (rc == FALSE)
+    return dwDefault;
+  
+  static HINSTANCE hShellInstance; // @@@PH where to put / initialize?
+  
+#if 0
+  struct
+  {
+    DWORD s1;
+    DWORD s2;
+    DWORD s3;
+    DWORD s4;
+  } sInit;
+  
+  sInit.s1 = "software...";
+  sInit.s2 = arg1;
+  sInit.s3 = arg2;
+  sInit.s4 = arg3;
+  
+  return DialogBoxParamW(hShellInstance,
+                         0x1200,          // some template
+                         hwndParent,
+                         i_DialogProc,
+                         &sInit);
+#endif
+
+  return dwDefault;
+}
+
+
+
 /*************************************************************************
 *      SHLWAPI_193 [SHLWAPI]
@@ -1037,10 +1163,10 @@
 
 /*****************************************************************************
- * Name      : LRESULT DefWindowProcAW
- * Purpose   : 
+ * Name      : SHLWAPI_240
+ * Purpose   : universal window procedure
  * Parameters: 
  * Variables :
  * Result    : 
- * Remark    : SHLWAPI.240 - this version has dynamic unicode behaviour
+ * Remark    : SHLWAPI.240
  * Status    : UNTESTED
  *
@@ -1048,14 +1174,14 @@
  *****************************************************************************/
 
-ODINFUNCTION4(LRESULT,      DefWindowProcAW,
-              HWND,         hWnd,
-              UINT,         Msg,
-              WPARAM,       wParam,
-              LPARAM,       lParam)
-{
-  if (IsWindowUnicode(hWnd))
-    return DefWindowProcW(hWnd, Msg, wParam, lParam);
+ODINFUNCTION4(DWORD,  SHLWAPI_240,
+              HWND,   hwnd,
+              UINT,   Msg,
+              WPARAM, wParam,
+              LPARAM, lParam)
+{
+  if (IsWindowUnicode(hwnd))
+    return DefWindowProcW(hwnd, Msg, wParam, lParam);
   else
-    return DefWindowProcA(hWnd, Msg, wParam, lParam);
+    return DefWindowProcA(hwnd, Msg, wParam, lParam);
 }
 
@@ -1070,4 +1196,29 @@
   return 0xabba1243;
 }
+
+
+/*****************************************************************************
+ * Name      : SHLWAPI_243
+ * Purpose   : does something critical, even with performance counters
+ * Parameters: 
+ * Variables :
+ * Result    : 
+ * Remark    : SHLWAPI.243
+ * Status    : UNTESTED
+ *
+ * Author    : Patrick Haller [Sun, 2000/06/10 04:02]
+ *****************************************************************************/
+
+ODINFUNCTION5(DWORD, SHLWAPI_243,
+              DWORD, arg0,
+              DWORD, arg1,
+              DWORD, arg2,
+              DWORD, arg3,
+              DWORD, arg4)
+{
+  dprintf(("not implementes.\n"));
+  return 0;
+}
+
 
 /*************************************************************************
@@ -1186,15 +1337,79 @@
 
 
+/*****************************************************************************
+ * Name      : DWORD SHLWAPI_376
+ * Purpose   : Try to determine user interface language
+ * Parameters: 
+ * Variables :
+ * Result    : 
+ * Remark    : SHLWAPI.366
+ * Status    : UNTESTED
+ *
+ * Author    : Patrick Haller [Sun, 2000/06/10 04:02]
+ *****************************************************************************/
+
+ODINFUNCTION0(DWORD, SHLWAPI_376)
+{
+  /* Microsoft does a hell of a job here: looks for
+   * - Internet Explorer
+   * - Office
+   * - Lpk ?
+   * - Resource Locales
+   * - etc.
+   */
+  
+  return 0x0409; // @@@PH maybe this is 'nuf for now.
+}
+
+
 
 /*************************************************************************
 *      SHLWAPI_377 [SHLWAPI]
 */
-ODINFUNCTION3(DWORD,  SHLWAPI_377,
-              LPVOID, x,
-              LPVOID, y,
-              LPVOID, z)
-{
-  FIXME("(%p %p %p)stub\n", x,y,z);
-  return 0xabba1246;
+ODINFUNCTION3(DWORD,   SHLWAPI_377,
+              LPSTR,   lpstrModule,
+              HMODULE, hModule,
+              LPVOID,  z)
+{
+  static BOOL flagSHLWAPI_377Initialized       = FALSE;
+  static BOOL flagInternetExplorerCheckVersion = FALSE;
+  
+  dprintf(("not (properly) implemented.\n"));
+  
+  char szModuleName[260]; // MAXPATHLEN
+  HMODULE hModLanguage;
+  
+  // initialize this subsystem
+  if (flagSHLWAPI_377Initialized == FALSE)
+  {
+    flagSHLWAPI_377Initialized = TRUE;
+    
+    flagInternetExplorerCheckVersion =
+    SHRegGetBoolUSValueA("Software\\Microsoft\\Internet Explorer\\International",
+                         "CheckVersion",
+                         1,
+                         1);
+  }
+  
+  if (lpstrModule == NULL) // Garbage in - garbage out
+    return 0;
+  
+  if (0 == GetModuleFileNameA(hModule,
+                              szModuleName,
+                              sizeof(szModuleName)))
+  {
+    // treat error
+  }
+  else
+  {
+    PathRemoveFileSpecA(szModuleName);
+    PathAppendA(szModuleName,
+                lpstrModule);
+    // @@@PH twiddle around with the current IE codepage
+    hModLanguage = LoadLibraryA(szModuleName);
+  }
+
+  
+  return hModLanguage;
 }
 
Index: trunk/src/shlwapi/reg.cpp
===================================================================
--- trunk/src/shlwapi/reg.cpp	(revision 3687)
+++ trunk/src/shlwapi/reg.cpp	(revision 3688)
@@ -1,3 +1,3 @@
-/* $Id: reg.cpp,v 1.2 2000-06-12 08:09:39 phaller Exp $ */
+/* $Id: reg.cpp,v 1.3 2000-06-12 11:35:14 phaller Exp $ */
 
 /*
@@ -180,16 +180,46 @@
  *****************************************************************************/
 
-ODINFUNCTION5(LONG,    SHRegGetBoolUSValueA,
-              LPCSTR,  pSubKey,
-              DWORD,   arg2,
-              DWORD,   arg3,
-              DWORD,   arg4,
-              DWORD,   arg5)
-{
-  char  szBuffer[264];
-  int   iLength;
-
-  dprintf(("(%p),stub!\n", pSubKey));
-
+ODINFUNCTION4(BOOL,    SHRegGetBoolUSValueA,
+              LPCSTR,  pszSubKey,
+              LPCSTR,  pszValue,
+              BOOL,    fIgnoreHKCU,
+              BOOL,    fDefault)
+{
+  char  szBuffer[260];
+  DWORD dwLength = sizeof(szBuffer);
+  LONG  rc;
+  
+  dprintf(("subkey=%s, value=%s\n",
+           pszSubKey,
+           pszValue));
+  
+  rc = SHRegGetUSValueA(pszSubKey,
+                        pszValue,
+                        &fDefault,
+                        szBuffer,
+                        &dwLength,
+                        fIgnoreHKCU,
+                        fDefault ? "YES" : "NO",
+                        fDefault ? 4 : 3);
+  if (rc != ERROR_SUCCESS)
+    return rc;
+  
+  if (lstrcmpiA("YES",
+                szBuffer) == 0)
+    return 1;
+  else
+  if (lstrcmpiA("TRUE",
+                szBuffer) == 0)
+    return 1;
+  else
+  if (lstrcmpiA("NO",
+                szBuffer) == 0)
+    return 0;
+  else
+  if (lstrcmpiA("FALSE",
+                szBuffer) == 0)
+    return 0;
+  
+  
   return ERROR_SUCCESS;  /* return success */
 }
@@ -208,15 +238,14 @@
  *****************************************************************************/
 
-ODINFUNCTION5(LONG,    SHRegGetBoolUSValueW,
-              LPCWSTR, pSubKey,
-              DWORD,   arg2,
-              DWORD,   arg3,
-              DWORD,   arg4,
-              DWORD,   arg5)
+ODINFUNCTION4(BOOL,    SHRegGetBoolUSValueW,
+              LPCWSTR, pszSubKey,
+              LPCWSTR, pszValue,
+              BOOL,    fIgnoreHKCU,
+              BOOL,    fDefault)
 {
   char  szBuffer[264];
   int   iLength;
 
-  dprintf(("(%p),stub!\n", pSubKey));
+  dprintf(("(%p),stub!\n", pszSubKey));
 
   return ERROR_SUCCESS;  /* return success */
Index: trunk/src/shlwapi/shlwapi.def
===================================================================
--- trunk/src/shlwapi/shlwapi.def	(revision 3687)
+++ trunk/src/shlwapi/shlwapi.def	(revision 3688)
@@ -1,3 +1,3 @@
-; $Id: shlwapi.def,v 1.16 2000-06-12 08:09:41 phaller Exp $
+; $Id: shlwapi.def,v 1.17 2000-06-12 11:35:14 phaller Exp $
 
 ; updated export ordinals to NT4 SP6 version of SHLWAPI.DLL
@@ -165,4 +165,6 @@
                              _SHLWAPI_169@4                       @169
                              _SHLWAPI_170@4                       @170
+                             _SHLWAPI_185@24                      @185
+                             _SHLWAPI_191@24                      @191
                              _SHLWAPI_193@0                       @193
                              _SHLWAPI_197@12                      @197
@@ -171,6 +173,7 @@
                              _SHLWAPI_223@4                       @223
                              _SHLWAPI_237@4                       @237
-                             _DefWindowProcAW@16                  @240
+                             _SHLWAPI_240@16                      @240
                              _SHLWAPI_241@0                       @241
+                             _SHLWAPI_243@20                      @243
 ;   AssocCreate            = _AssocCreate@20                      @253
 ;   AssocQueryKeyA         = _AssocQueryKeyA@20                   @254
@@ -186,4 +189,5 @@
                              _SHLWAPI_346@12                      @346
                              _SHLWAPI_364@12                      @364
+                             _SHLWAPI_376@0                       @376
                              _SHLWAPI_377@12                      @377
 ;   AssocQueryStringA      = _AssocQueryStringA@20                @381
@@ -358,6 +362,6 @@
   ; SHRegEnumUSValueA      = _SHRegEnumUSValueA@?                 @603
   ; SHRegEnumUSValueA      = _SHRegEnumUSValueW@?                 @604
-    SHRegGetBoolUSValueA   = _SHRegGetBoolUSValueA@20             @605
-    SHRegGetBoolUSValueW   = _SHRegGetBoolUSValueW@20             @606
+    SHRegGetBoolUSValueA   = _SHRegGetBoolUSValueA@16             @605
+    SHRegGetBoolUSValueW   = _SHRegGetBoolUSValueW@16             @606
     SHRegGetUSValueA       = _SHRegGetUSValueA@32                 @607
     SHRegGetUSValueW       = _SHRegGetUSValueW@32                 @608
@@ -399,5 +403,5 @@
     StrCpyA                = _StrCpyA@8                                 ; not exported ?
     StrCpyW                = _StrCpyW@8                           @643
-  ; StrDupA                = _StrDupA@?                           @644
+    StrDupA                = _StrDupA@4                           @644
     StrDupW                = _StrDupW@4                           @645
 ;   StrFormatByteSize64A   = _StrFormatByteSize64A@16             @646
Index: trunk/src/shlwapi/shlwapi.h
===================================================================
--- trunk/src/shlwapi/shlwapi.h	(revision 3687)
+++ trunk/src/shlwapi/shlwapi.h	(revision 3688)
@@ -1,3 +1,3 @@
-/* $Id: shlwapi.h,v 1.2 2000-06-12 08:09:44 phaller Exp $ */
+/* $Id: shlwapi.h,v 1.3 2000-06-12 11:35:14 phaller Exp $ */
 
 /*
@@ -31,4 +31,30 @@
  *****************************************************************************/
     
+// REG.CPP
+BOOL WIN32API SHRegGetBoolUSValueA(LPCSTR pszSubKey,
+                                   LPCSTR pszValue,
+                                   BOOL   fIgnoreHKCU,
+                                   BOOL   fDefault);
+    
+BOOL WIN32API SHRegGetBoolUSValueW(LPCWSTR pszSubKey,
+                                   LPCWSTR pszValue,
+                                   BOOL    fIgnoreHKCU,
+                                   BOOL    fDefault);
+    
+LONG WIN32API SHRegGetUSValueA(LPCSTR   pSubKey,
+                               LPCSTR   pValue,
+                               LPDWORD  pwType,
+                               LPVOID   pvData,
+                               LPDWORD  pbData,
+                               BOOL     fIgnoreHKCU,
+                               LPVOID   pDefaultData,
+                               DWORD    wDefaultDataSize);
+    
+// PATH.CPP
+LPSTR WIN32API PathRemoveFileSpecA(LPSTR lpstrFilename);
+LPSTR WIN32API PathAppendA(LPSTR lpstrPath,
+                           LPSTR lpstrAppend);
+    
+// STRING.CPP
 LPSTR WIN32API StrStrIA(LPCSTR lpFirst, LPCSTR lpSrch);
     
