Sync to Wine-20050628:
Dmitry Timoshkov <dmitry@codeweavers.com>
- Make remaining OLE interface vtables const.
Mike McCormack <mike@codeweavers.com>
- Stub implementation for GetSoftwareUpdateInfo.
- Declare functions and correct prototypes.
Maarten Lankhorst <m.b.lankhorst@gmail.com>
- Improved ObtainUserAgentString stub.
Stefan Huehner <stefan@huehner.org>
- Fix some more -Wstrict-prototypes warnings.
Modified: trunk/reactos/include/wine/urlmon.h
Modified: trunk/reactos/lib/urlmon/sec_mgr.c
Modified: trunk/reactos/lib/urlmon/umon.c
Modified: trunk/reactos/lib/urlmon/urlmon.spec
Modified: trunk/reactos/lib/urlmon/urlmon_main.c
Modified: trunk/reactos/lib/urlmon/urlmon_main.h

Modified: trunk/reactos/include/wine/urlmon.h
--- trunk/reactos/include/wine/urlmon.h	2005-08-05 20:46:20 UTC (rev 17078)
+++ trunk/reactos/include/wine/urlmon.h	2005-08-05 20:48:26 UTC (rev 17079)
@@ -2221,6 +2221,22 @@
 
 #endif  /* __IInternetZoneManager_INTERFACE_DEFINED__ */
 
+typedef struct _tagSOFTDISTINFO {
+    ULONG cbSize;
+    DWORD dwFlags;
+    DWORD dwAdState;
+    LPWSTR szTitle;
+    LPWSTR szAbstract;
+    LPWSTR szHREF;
+    DWORD dwInstalledVersionMS;
+    DWORD dwInstalledVersionLS;
+    DWORD dwUpdateVersionMS;
+    DWORD dwUpdateVersionLS;
+    DWORD dwAdvertisedVersionMS;
+    DWORD dwAdvertisedVersionLS;
+    DWORD dwReserved;
+} SOFTDISTINFO, *LPSOFTDISTINFO;
+
 DEFINE_GUID(CLSID_InternetSecurityManager, 0x7b8a2d94, 0x0ac9, 0x11d1, 0x89, 0x6c, 0x00, 0xc0, 0x4f, 0xB6, 0xbf, 0xc4);
 DEFINE_GUID(CLSID_InternetZoneManager, 0x7B8A2D95, 0x0AC9, 0x11D1, 0x89, 0x6C, 0x00, 0xC0, 0x4F, 0xB6, 0xBF, 0xC4);
 DEFINE_GUID(IID_IAsyncMoniker, 0x79EAC9D3, 0xBAF9, 0x11CE, 0x8C, 0x82, 0x00, 0xAA, 0x00, 0x4B, 0xA9, 0x0B);

Modified: trunk/reactos/lib/urlmon/sec_mgr.c
--- trunk/reactos/lib/urlmon/sec_mgr.c	2005-08-05 20:46:20 UTC (rev 17078)
+++ trunk/reactos/lib/urlmon/sec_mgr.c	2005-08-05 20:48:26 UTC (rev 17079)
@@ -41,7 +41,7 @@
  */
 typedef struct SecManagerImpl{
 
-    IInternetSecurityManagerVtbl*  lpvtbl1;  /* VTable relative to the IInternetSecurityManager interface.*/
+    const IInternetSecurityManagerVtbl* lpvtbl1;  /* VTable relative to the IInternetSecurityManager interface.*/
 
     ULONG ref; /* reference counter for this object */
 
@@ -174,7 +174,7 @@
     return E_NOTIMPL;
 }
 
-static IInternetSecurityManagerVtbl VT_SecManagerImpl =
+static const IInternetSecurityManagerVtbl VT_SecManagerImpl =
 {
     SecManagerImpl_QueryInterface,
     SecManagerImpl_AddRef,
@@ -209,7 +209,7 @@
  *
  */
 typedef struct {
-    IInternetZoneManagerVtbl* lpVtbl;
+    const IInternetZoneManagerVtbl* lpVtbl;
     ULONG ref;
 } ZoneMgrImpl;
 
@@ -430,7 +430,7 @@
 /********************************************************************
  *      IInternetZoneManager_Construct
  */
-static IInternetZoneManagerVtbl ZoneMgrImplVtbl = {
+static const IInternetZoneManagerVtbl ZoneMgrImplVtbl = {
     ZoneMgrImpl_QueryInterface,
     ZoneMgrImpl_AddRef,
     ZoneMgrImpl_Release,

Modified: trunk/reactos/lib/urlmon/umon.c
--- trunk/reactos/lib/urlmon/umon.c	2005-08-05 20:46:20 UTC (rev 17078)
+++ trunk/reactos/lib/urlmon/umon.c	2005-08-05 20:48:26 UTC (rev 17079)
@@ -49,7 +49,7 @@
 /*static BOOL registered_wndclass = FALSE;*/
 
 typedef struct {
-    IBindingVtbl *lpVtbl;
+    const IBindingVtbl *lpVtbl;
 
     ULONG ref;
 
@@ -273,7 +273,7 @@
     This->pbscb = 0;
 }
 
-static IBindingVtbl BindingVtbl =
+static const IBindingVtbl BindingVtbl =
 {
     Binding_QueryInterface,
     Binding_AddRef,
@@ -289,7 +289,7 @@
 /* filemoniker data structure */
 typedef struct {
 
-    IMonikerVtbl*  lpvtbl;  /* VTable relative to the IMoniker interface.*/
+    const IMonikerVtbl* lpvtbl;  /* VTable relative to the IMoniker interface.*/
 
     ULONG ref; /* reference counter for this object */
 
@@ -1103,7 +1103,7 @@
 /********************************************************************************/
 /* Virtual function table for the URLMonikerImpl class which  include IPersist,*/
 /* IPersistStream and IMoniker functions.                                       */
-static IMonikerVtbl VT_URLMonikerImpl =
+static const IMonikerVtbl VT_URLMonikerImpl =
 {
     URLMonikerImpl_QueryInterface,
     URLMonikerImpl_AddRef,
@@ -1735,3 +1735,12 @@
     return HlinkSimpleNavigateToString( 
                szTarget, NULL, NULL, pUnk, NULL, NULL, 0, 0 );
 }
+
+/***********************************************************************
+ *           GetSoftwareUpdateInfo (URLMON.@)
+ */
+HRESULT WINAPI GetSoftwareUpdateInfo( LPCWSTR szDistUnit, LPSOFTDISTINFO psdi )
+{
+    FIXME("%s %p\n", debugstr_w(szDistUnit), psdi );
+    return E_FAIL;
+}

Modified: trunk/reactos/lib/urlmon/urlmon.spec
--- trunk/reactos/lib/urlmon/urlmon.spec	2005-08-05 20:46:20 UTC (rev 17078)
+++ trunk/reactos/lib/urlmon/urlmon.spec	2005-08-05 20:48:26 UTC (rev 17079)
@@ -41,7 +41,7 @@
 @ stub GetClassURL
 @ stub GetComponentIDFromCLSSPEC
 @ stub GetMarkOfTheWeb
-@ stub GetSoftwareUpdateInfo
+@ stdcall GetSoftwareUpdateInfo(ptr ptr)
 @ stub HlinkGoBack
 @ stub HlinkGoForward
 @ stub HlinkNavigateMoniker

Modified: trunk/reactos/lib/urlmon/urlmon_main.c
--- trunk/reactos/lib/urlmon/urlmon_main.c	2005-08-05 20:46:20 UTC (rev 17078)
+++ trunk/reactos/lib/urlmon/urlmon_main.c	2005-08-05 20:48:26 UTC (rev 17079)
@@ -174,7 +174,7 @@
     return S_OK;
 }
 
-static IClassFactoryVtbl CF_Vtbl =
+static const IClassFactoryVtbl CF_Vtbl =
 {
     CF_QueryInterface,
     CF_AddRef,
@@ -250,7 +250,7 @@
 /**************************************************************************
  *                 UrlMkSetSessionOption (URLMON.@)
  */
-HRESULT WINAPI UrlMkSetSessionOption(DWORD dwOption, LPVOID *pBuffer, DWORD dwBufferLength,
+HRESULT WINAPI UrlMkSetSessionOption(DWORD dwOption, LPVOID pBuffer, DWORD dwBufferLength,
  					DWORD Reserved)
 {
     FIXME("(%#lx, %p, %#lx): stub\n", dwOption, pBuffer, dwBufferLength);
@@ -261,7 +261,7 @@
 /**************************************************************************
  *                 UrlMkGetSessionOption (URLMON.@)
  */
-HRESULT WINAPI UrlMkGetSessionOption(DWORD dwOption, LPVOID *pBuffer, DWORD dwBufferLength,
+HRESULT WINAPI UrlMkGetSessionOption(DWORD dwOption, LPVOID pBuffer, DWORD dwBufferLength,
                                         DWORD* pdwBufferLength, DWORD dwReserved)
 {
     FIXME("(%#lx, %p, %#lx, %p): stub\n", dwOption, pBuffer, dwBufferLength, pdwBufferLength);
@@ -269,10 +269,12 @@
     return S_OK;
 }
 
+static const CHAR Agent[] = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)";
+
 /**************************************************************************
  *                 ObtainUserAgentString (URLMON.@)
  */
-HRESULT WINAPI ObtainUserAgentString(DWORD dwOption, LPCSTR pcszUAOut, DWORD *cbSize)
+HRESULT WINAPI ObtainUserAgentString(DWORD dwOption, LPSTR pcszUAOut, DWORD *cbSize)
 {
     FIXME("(%ld, %p, %p): stub\n", dwOption, pcszUAOut, cbSize);
 
@@ -280,6 +282,10 @@
       ERR("dwOption: %ld, must be zero\n", dwOption);
     }
 
+    if (sizeof(Agent) < *cbSize)
+        *cbSize = sizeof(Agent);
+    lstrcpynA(pcszUAOut, Agent, *cbSize); 
+
     return S_OK;
 }
 

Modified: trunk/reactos/lib/urlmon/urlmon_main.h
--- trunk/reactos/lib/urlmon/urlmon_main.h	2005-08-05 20:46:20 UTC (rev 17078)
+++ trunk/reactos/lib/urlmon/urlmon_main.h	2005-08-05 20:48:26 UTC (rev 17079)
@@ -32,8 +32,8 @@
  * Dll lifetime tracking declaration for urlmon.dll
  */
 extern LONG URLMON_refCount;
-static inline void URLMON_LockModule() { InterlockedIncrement( &URLMON_refCount ); }
-static inline void URLMON_UnlockModule() { InterlockedDecrement( &URLMON_refCount ); }
+static inline void URLMON_LockModule(void) { InterlockedIncrement( &URLMON_refCount ); }
+static inline void URLMON_UnlockModule(void) { InterlockedDecrement( &URLMON_refCount ); }
 
 #define ICOM_THIS_MULTI(impl,field,iface) impl* const This=(impl*)((char*)(iface) - offsetof(impl,field))