urlmon: Fix compilation on systems that don't support nameless unions.

This commit is contained in:
Francois Gouget 2007-08-08 10:48:45 +02:00 committed by Alexandre Julliard
parent f045243542
commit 988be5dd8f
2 changed files with 5 additions and 4 deletions

View File

@ -25,6 +25,7 @@
#include <stdarg.h>
#define COBJMACROS
#define NONAMELESSUNION
#include "windef.h"
#include "winbase.h"
@ -516,7 +517,7 @@ static HRESULT WINAPI HttpProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl
WARN("Expected This->bind_info.stgmedData.tymed to be TYMED_HGLOBAL, not %d\n",
This->bind_info.stgmedData.tymed);
else
optional = (LPWSTR)This->bind_info.stgmedData.hGlobal;
optional = (LPWSTR)This->bind_info.stgmedData.u.hGlobal;
}
if (!HttpSendRequestW(This->request, This->full_header, lstrlenW(This->full_header),
optional,

View File

@ -547,14 +547,14 @@ static HRESULT WINAPI BindInfo_GetBindInfo(IInternetBindInfo *iface, DWORD *grfB
{
/* Must be GMEM_FIXED, GMEM_MOVABLE does not work properly
* with urlmon on native (Win98 and WinXP) */
pbindinfo->stgmedData.hGlobal = GlobalAlloc(GPTR, sizeof(szPostData));
if (!pbindinfo->stgmedData.hGlobal)
U(pbindinfo->stgmedData).hGlobal = GlobalAlloc(GPTR, sizeof(szPostData));
if (!U(pbindinfo->stgmedData).hGlobal)
{
http_post_test = FALSE;
skip("Out of memory\n");
return E_OUTOFMEMORY;
}
lstrcpy((LPSTR)pbindinfo->stgmedData.hGlobal, szPostData);
lstrcpy((LPSTR)U(pbindinfo->stgmedData).hGlobal, szPostData);
pbindinfo->cbstgmedData = sizeof(szPostData)-1;
pbindinfo->dwBindVerb = BINDVERB_POST;
pbindinfo->stgmedData.tymed = TYMED_HGLOBAL;