From d3225753965437a4cca70552c927d02730b2fc48 Mon Sep 17 00:00:00 2001 From: Jan Zerebecki Date: Tue, 30 Sep 2008 19:41:33 +0200 Subject: [PATCH] push fd8ae99a1a668da848ea6aec4d820a2131aaa6ce --- dlls/advapi32/tests/service.c | 16 ++-- dlls/avifil32/extrachunk.c | 26 +++--- dlls/avifil32/icmstream.c | 12 +-- dlls/comcat/information.c | 31 ++++--- dlls/comctl32/comctl_Ja.rc | 6 +- dlls/comctl32/listview.c | 3 +- dlls/comctl32/tests/monthcal.c | 3 +- dlls/comctl32/tests/mru.c | 3 +- dlls/comctl32/tests/tooltips.c | 14 +-- dlls/crypt32/tests/cert.c | 88 +++++++++++++------ dlls/d3d8/vertexshader.c | 3 +- dlls/d3d9/vertexshader.c | 3 +- dlls/ddraw/ddraw.c | 2 +- dlls/ddraw/device.c | 8 +- dlls/ddraw/direct3d.c | 2 +- dlls/ddraw/utils.c | 2 +- dlls/dinput/dinput_main.c | 22 ++--- dlls/dinput/effect_linuxinput.c | 2 +- dlls/dinput/joystick_linux.c | 2 +- dlls/dinput/joystick_linuxinput.c | 6 +- dlls/dplayx/tests/dplayx.c | 13 +++ dlls/gdi32/tests/brush.c | 9 +- dlls/gdi32/tests/pen.c | 8 +- dlls/gdiplus/brush.c | 46 ++++++---- dlls/gdiplus/gdiplus.spec | 6 +- dlls/gdiplus/graphics.c | 39 +++++++++ dlls/gdiplus/image.c | 60 ++++++++----- dlls/gdiplus/tests/graphics.c | 12 +++ dlls/inetmib1/tests/main.c | 52 +++++++++-- dlls/jscript/jsutils.c | 2 +- dlls/jscript/string.c | 2 +- dlls/msacm32/msacm_Ja.rc | 2 +- dlls/mshtml/Ja.rc | 55 ++++++++++++ dlls/mshtml/rsrc.rc | 1 + dlls/mshtml/task.c | 2 + dlls/mshtml/tests/htmldoc.c | 59 +++++++++++-- dlls/msi/tests/install.c | 13 ++- dlls/msi/tests/package.c | 3 +- dlls/ole32/tests/clipboard.c | 13 ++- dlls/ole32/tests/dragdrop.c | 36 ++++++-- dlls/oledlg/insobjdlg.c | 2 +- dlls/oledlg/oledlg_Ja.rc | 2 +- dlls/opengl32/make_opengl | 16 ++-- dlls/opengl32/tests/opengl.c | 40 ++++----- dlls/riched20/tests/editor.c | 20 ++++- dlls/secur32/tests/main.c | 13 ++- dlls/secur32/tests/secur32.c | 4 + dlls/serialui/Ja.rc | 2 +- dlls/shdocvw/tests/webbrowser.c | 22 +++-- dlls/shlwapi/shlwapi_Ja.rc | 2 +- dlls/shlwapi/tests/path.c | 38 ++------ dlls/shlwapi/url.c | 4 +- dlls/urlmon/bindctx.c | 3 +- dlls/urlmon/tests/protocol.c | 97 +++++++++++---------- dlls/user32/tests/input.c | 98 ++++++++++++++------- dlls/user32/tests/win.c | 3 +- dlls/uxtheme/draw.c | 9 +- dlls/wineps.drv/wps_Ja.rc | 2 +- dlls/winhttp/tests/notification.c | 11 +-- dlls/wininet/wininet_Ja.rc | 2 +- dlls/winspool.drv/info.c | 21 ++--- dlls/wintrust/softpub.c | 91 +++++++++++++------ include/cryptuiapi.h | 1 + include/gdiplusflat.h | 3 + include/wincrypt.h | 2 +- programs/reg/{rsrc.rc => Ja.rc} | 26 +++--- programs/reg/rsrc.rc | 1 + programs/{reg/rsrc.rc => write/Ja.rc} | 24 ++--- programs/write/rsrc.rc | 1 + tools/winapi/msvcmaker | 159 +++++++++++++++++++++++----------- tools/winebuild/build.h | 12 ++- 71 files changed, 953 insertions(+), 465 deletions(-) create mode 100644 dlls/mshtml/Ja.rc copy programs/reg/{rsrc.rc => Ja.rc} (61%) copy programs/{reg/rsrc.rc => write/Ja.rc} (72%) diff --git a/dlls/advapi32/tests/service.c b/dlls/advapi32/tests/service.c index da62b0b5e8b..d28aad15445 100644 --- a/dlls/advapi32/tests/service.c +++ b/dlls/advapi32/tests/service.c @@ -649,7 +649,7 @@ static void test_get_displayname(void) /* Delete the service */ ret = DeleteService(svc_handle); - ok(ret, "Expected success\n"); + ok(ret, "Expected success (err=%d)\n", GetLastError()); CloseServiceHandle(svc_handle); CloseServiceHandle(scm_handle); @@ -1985,7 +1985,7 @@ static void test_refcount(void) /* Check if we can close the handle to the Service Control Manager */ ret = CloseServiceHandle(scm_handle); - ok(ret, "Expected success\n"); + ok(ret, "Expected success (err=%d)\n", GetLastError()); /* Get a new handle to the Service Control Manager */ scm_handle = OpenSCManagerA(NULL, NULL, GENERIC_ALL); @@ -1997,7 +1997,7 @@ static void test_refcount(void) /* Delete the service */ ret = DeleteService(svc_handle4); - ok(ret, "Expected success\n"); + ok(ret, "Expected success (err=%d)\n", GetLastError()); /* We cannot create the same service again as it's still marked as 'being deleted'. * The reason is that we still have 4 open handles to this service even though we @@ -2023,13 +2023,13 @@ static void test_refcount(void) /* Close all the handles to the service and try again */ ret = CloseServiceHandle(svc_handle4); - ok(ret, "Expected success\n"); + ok(ret, "Expected success (err=%d)\n", GetLastError()); ret = CloseServiceHandle(svc_handle3); - ok(ret, "Expected success\n"); + ok(ret, "Expected success (err=%d)\n", GetLastError()); ret = CloseServiceHandle(svc_handle2); - ok(ret, "Expected success\n"); + ok(ret, "Expected success (err=%d)\n", GetLastError()); ret = CloseServiceHandle(svc_handle1); - ok(ret, "Expected success\n"); + ok(ret, "Expected success (err=%d)\n", GetLastError()); /* Wait a while. Doing a CreateService too soon will result again * in an ERROR_SERVICE_MARKED_FOR_DELETE error. @@ -2044,7 +2044,7 @@ static void test_refcount(void) /* Delete the service */ ret = DeleteService(svc_handle5); - ok(ret, "Expected success\n"); + ok(ret, "Expected success (err=%d)\n", GetLastError()); /* Wait a while. Just in case one of the following tests does a CreateService again */ Sleep(1000); diff --git a/dlls/avifil32/extrachunk.c b/dlls/avifil32/extrachunk.c index 45096e877a2..5b8762318ed 100644 --- a/dlls/avifil32/extrachunk.c +++ b/dlls/avifil32/extrachunk.c @@ -145,7 +145,7 @@ HRESULT FindChunkAndKeepExtras(LPEXTRACHUNKS extra,HMMIO hmmio,MMCKINFO *lpck, { FOURCC ckid; FOURCC fccType; - HRESULT hr; + MMRESULT mmr; /* pre-conditions */ assert(extra != NULL); @@ -171,12 +171,13 @@ HRESULT FindChunkAndKeepExtras(LPEXTRACHUNKS extra,HMMIO hmmio,MMCKINFO *lpck, TRACE(": find ckid=0x%08X fccType=0x%08X\n", ckid, fccType); for (;;) { - hr = mmioDescend(hmmio, lpck, lpckParent, 0); - if (hr != S_OK) { + mmr = mmioDescend(hmmio, lpck, lpckParent, 0); + if (mmr != MMSYSERR_NOERROR) { /* No extra chunks in front of desired chunk? */ - if (flags == 0 && hr == MMIOERR_CHUNKNOTFOUND) - hr = AVIERR_OK; - return hr; + if (flags == 0 && mmr == MMIOERR_CHUNKNOTFOUND) + return AVIERR_OK; + else + return AVIERR_FILEREAD; } /* Have we found what we search for? */ @@ -187,10 +188,15 @@ HRESULT FindChunkAndKeepExtras(LPEXTRACHUNKS extra,HMMIO hmmio,MMCKINFO *lpck, /* Skip padding chunks, the others put into the extrachunk-structure */ if (lpck->ckid == ckidAVIPADDING || lpck->ckid == mmioFOURCC('p','a','d','d')) - hr = mmioAscend(hmmio, lpck, 0); + { + mmr = mmioAscend(hmmio, lpck, 0); + if (mmr != MMSYSERR_NOERROR) return AVIERR_FILEREAD; + } else - hr = ReadChunkIntoExtra(extra, hmmio, lpck); - if (FAILED(hr)) - return hr; + { + HRESULT hr = ReadChunkIntoExtra(extra, hmmio, lpck); + if (FAILED(hr)) + return hr; + } } } diff --git a/dlls/avifil32/icmstream.c b/dlls/avifil32/icmstream.c index 8ac2e33682f..a5b221a495b 100644 --- a/dlls/avifil32/icmstream.c +++ b/dlls/avifil32/icmstream.c @@ -821,14 +821,14 @@ static HRESULT AVIFILE_EncodeFrame(IAVIStreamImpl *This, do { DWORD idxCkid = 0; - HRESULT hr; + DWORD res; - hr = ICCompress(This->hic,icmFlags,This->lpbiCur,This->lpCur,lpbi,lpBits, - &idxCkid, &idxFlags, This->lCurrent, dwRequest, dwCurQual, - noPrev ? NULL:This->lpbiPrev, noPrev ? NULL:This->lpPrev); - if (hr == ICERR_NEWPALETTE) { + res = ICCompress(This->hic,icmFlags,This->lpbiCur,This->lpCur,lpbi,lpBits, + &idxCkid, &idxFlags, This->lCurrent, dwRequest, dwCurQual, + noPrev ? NULL:This->lpbiPrev, noPrev ? NULL:This->lpPrev); + if (res == ICERR_NEWPALETTE) { FIXME(": codec has changed palette -- unhandled!\n"); - } else if (hr != ICERR_OK) + } else if (res != ICERR_OK) return AVIERR_COMPRESSOR; /* need to check for framesize */ diff --git a/dlls/comcat/information.c b/dlls/comcat/information.c index cd5a9ea9dd9..d2d4df8adac 100644 --- a/dlls/comcat/information.c +++ b/dlls/comcat/information.c @@ -373,7 +373,8 @@ static HRESULT WINAPI COMCAT_IEnumCATEGORYINFO_Next( if (This == NULL || rgelt == NULL) return E_POINTER; if (This->key) while (fetched < celt) { - HRESULT res; + LSTATUS res; + HRESULT hr; WCHAR catid[39]; DWORD cName = 39; HKEY subkey; @@ -383,16 +384,16 @@ static HRESULT WINAPI COMCAT_IEnumCATEGORYINFO_Next( if (res != ERROR_SUCCESS && res != ERROR_MORE_DATA) break; ++(This->next_index); - res = CLSIDFromString(catid, &rgelt->catid); - if (FAILED(res)) continue; + hr = CLSIDFromString(catid, &rgelt->catid); + if (FAILED(hr)) continue; res = RegOpenKeyExW(This->key, catid, 0, KEY_READ, &subkey); if (res != ERROR_SUCCESS) continue; - res = COMCAT_GetCategoryDesc(subkey, This->lcid, - rgelt->szDescription, 128); + hr = COMCAT_GetCategoryDesc(subkey, This->lcid, + rgelt->szDescription, 128); RegCloseKey(subkey); - if (FAILED(res)) continue; + if (FAILED(hr)) continue; rgelt->lcid = This->lcid; ++fetched; @@ -677,7 +678,8 @@ static HRESULT WINAPI COMCAT_CLSID_IEnumGUID_Next( if (This == NULL || rgelt == NULL) return E_POINTER; if (This->key) while (fetched < celt) { - HRESULT res; + LSTATUS res; + HRESULT hr; WCHAR clsid[39]; DWORD cName = 39; HKEY subkey; @@ -687,15 +689,15 @@ static HRESULT WINAPI COMCAT_CLSID_IEnumGUID_Next( if (res != ERROR_SUCCESS && res != ERROR_MORE_DATA) break; ++(This->next_index); - res = CLSIDFromString(clsid, rgelt); - if (FAILED(res)) continue; + hr = CLSIDFromString(clsid, rgelt); + if (FAILED(hr)) continue; res = RegOpenKeyExW(This->key, clsid, 0, KEY_READ, &subkey); if (res != ERROR_SUCCESS) continue; - res = COMCAT_IsClassOfCategories(subkey, This->categories); + hr = COMCAT_IsClassOfCategories(subkey, This->categories); RegCloseKey(subkey); - if (res != S_OK) continue; + if (hr != S_OK) continue; ++fetched; ++rgelt; @@ -868,7 +870,8 @@ static HRESULT WINAPI COMCAT_CATID_IEnumGUID_Next( if (This == NULL || rgelt == NULL) return E_POINTER; if (This->key) while (fetched < celt) { - HRESULT res; + LSTATUS res; + HRESULT hr; WCHAR catid[39]; DWORD cName = 39; @@ -877,8 +880,8 @@ static HRESULT WINAPI COMCAT_CATID_IEnumGUID_Next( if (res != ERROR_SUCCESS && res != ERROR_MORE_DATA) break; ++(This->next_index); - res = CLSIDFromString(catid, rgelt); - if (FAILED(res)) continue; + hr = CLSIDFromString(catid, rgelt); + if (FAILED(hr)) continue; ++fetched; ++rgelt; diff --git a/dlls/comctl32/comctl_Ja.rc b/dlls/comctl32/comctl_Ja.rc index b00969a3e08..6152d42cf75 100644 --- a/dlls/comctl32/comctl_Ja.rc +++ b/dlls/comctl32/comctl_Ja.rc @@ -21,7 +21,7 @@ LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT IDD_PROPSHEET DIALOG DISCARDABLE 0, 0, 220, 140 STYLE DS_CONTEXTHELP | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE CAPTION "Properties for %s" -FONT 9, "MS UI Gothic" +FONT 9, "MS Shell Dlg" BEGIN DEFPUSHBUTTON "OK", IDOK,4,122,50,14, WS_TABSTOP | WS_GROUP PUSHBUTTON "ƒLƒƒƒ“ƒZƒ‹", IDCANCEL,58,122,50,14 @@ -34,7 +34,7 @@ END IDD_WIZARD DIALOG DISCARDABLE 0, 0, 290, 159 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE CAPTION "Wizard" -FONT 9, "MS UI Gothic" +FONT 9, "MS Shell Dlg" BEGIN PUSHBUTTON "< –ß‚é(&B)", IDC_BACK_BUTTON,71,138,50,14 DEFPUSHBUTTON "�i‚Þ(&N) >", IDC_NEXT_BUTTON,121,138,50,14 @@ -50,7 +50,7 @@ END IDD_TBCUSTOMIZE DIALOG DISCARDABLE 10, 20, 357, 125 STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Customize Toolbar" -FONT 9, "MS UI Gothic" +FONT 9, "MS Shell Dlg" BEGIN DEFPUSHBUTTON "•Â‚¶‚é(&C)", IDCANCEL,308,6,44,14 PUSHBUTTON "ƒŠƒZƒbƒg(R&)", IDC_RESET_BTN,308,23,44,14 diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index 70555e850ac..34e6208f9ba 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -1713,7 +1713,8 @@ static void LISTVIEW_UpdateScroll(const LISTVIEW_INFO *infoPtr) if(vertInfo.nPage < infoPtr->nItemHeight) vertInfo.nPage = infoPtr->nItemHeight; - vertInfo.nPage /= infoPtr->nItemHeight; + if (infoPtr->nItemHeight > 0) + vertInfo.nPage /= infoPtr->nItemHeight; } else if (uView != LVS_LIST) /* LVS_ICON, or LVS_SMALLICON */ { diff --git a/dlls/comctl32/tests/monthcal.c b/dlls/comctl32/tests/monthcal.c index 271dfd1b6f9..6f2ae70a4d0 100644 --- a/dlls/comctl32/tests/monthcal.c +++ b/dlls/comctl32/tests/monthcal.c @@ -673,7 +673,8 @@ static void test_monthcal_firstDay(HWND hwnd) if (i == -1){ expect(MAKELONG(fday, FALSE), res); }else if (i >= 7){ - expect(MAKELONG(fday, TRUE), res); + /* out of range sets max first day of week, locale is ignored */ + expect(MAKELONG(6, TRUE), res); }else{ expect(MAKELONG(i, TRUE), res); } diff --git a/dlls/comctl32/tests/mru.c b/dlls/comctl32/tests/mru.c index 1e5542539e6..8ebec86f148 100644 --- a/dlls/comctl32/tests/mru.c +++ b/dlls/comctl32/tests/mru.c @@ -410,8 +410,7 @@ static void test_MRUListA(void) pFreeMRUList(hMRU); } - /* Free (NULL list) - Doesn't crash */ - pFreeMRUList(NULL); + /* FreeMRUList(NULL) crashes on Win98 OSR0 */ } START_TEST(mru) diff --git a/dlls/comctl32/tests/tooltips.c b/dlls/comctl32/tests/tooltips.c index 6bf5a3a0220..7454b6f613a 100644 --- a/dlls/comctl32/tests/tooltips.c +++ b/dlls/comctl32/tests/tooltips.c @@ -257,12 +257,14 @@ static void test_gettext(void) GetClientRect(hwnd, &toolinfoA.rect); r = SendMessageA(hwnd, TTM_ADDTOOL, 0, (LPARAM)&toolinfoA); ok(r, "Adding the tool to the tooltip failed\n"); - - toolinfoA.hwnd = NULL; - toolinfoA.uId = (UINT_PTR)0x1234ABCD; - toolinfoA.lpszText = bufA; - SendMessageA(hwnd, TTM_GETTEXTA, 0, (LPARAM)&toolinfoA); - ok(strcmp(toolinfoA.lpszText, "") == 0, "lpszText should be an empty string\n"); + if (r) + { + toolinfoA.hwnd = NULL; + toolinfoA.uId = (UINT_PTR)0x1234ABCD; + toolinfoA.lpszText = bufA; + SendMessageA(hwnd, TTM_GETTEXTA, 0, (LPARAM)&toolinfoA); + ok(strcmp(toolinfoA.lpszText, "") == 0, "lpszText should be an empty string\n"); + } DestroyWindow(hwnd); diff --git a/dlls/crypt32/tests/cert.c b/dlls/crypt32/tests/cert.c index b4f876036e9..558aa11a470 100644 --- a/dlls/crypt32/tests/cert.c +++ b/dlls/crypt32/tests/cert.c @@ -2535,11 +2535,15 @@ static void testComparePublicKeyInfo(void) ret = CertComparePublicKeyInfo(0, &info1, &info2); ok(!ret, "CertComparePublicKeyInfo: as raw binary: keys should be unequal\n"); ret = CertComparePublicKeyInfo(X509_ASN_ENCODING, &info1, &info2); - ok(ret, "CertComparePublicKeyInfo: as ASN.1 encoded: keys should be equal\n"); + ok(ret || + broken(!ret), /* win9x */ + "CertComparePublicKeyInfo: as ASN.1 encoded: keys should be equal\n"); info1.PublicKey.cUnusedBits = 1; info2.PublicKey.cUnusedBits = 5; ret = CertComparePublicKeyInfo(X509_ASN_ENCODING, &info1, &info2); - ok(ret, "CertComparePublicKeyInfo: ASN.1 encoding should ignore cUnusedBits\n"); + ok(ret || + broken(!ret), /* win9x */ + "CertComparePublicKeyInfo: ASN.1 encoding should ignore cUnusedBits\n"); info1.PublicKey.cUnusedBits = 0; info2.PublicKey.cUnusedBits = 0; info1.PublicKey.cbData--; /* kill one byte, make ASN.1 encoded data invalid */ @@ -2592,18 +2596,23 @@ static void testHashPublicKeyInfo(void) "Expected STATUS_ACCESS_VIOLATION, got %08x\n", GetLastError()); } ret = CryptHashPublicKeyInfo(0, 0, 0, X509_ASN_ENCODING, &info, NULL, &len); - ok(ret, "CryptHashPublicKeyInfo failed: %08x\n", GetLastError()); - ok(len == 16, "Expected hash size 16, got %d\n", len); - if (len == 16) + ok(ret || + broken(!ret), /* win9x */ + "CryptHashPublicKeyInfo failed: %08x\n", GetLastError()); + if (ret) { - static const BYTE emptyHash[] = { 0xb8,0x51,0x3a,0x31,0x0e,0x9f,0x40, - 0x36,0x9c,0x92,0x45,0x1b,0x9d,0xc8,0xf9,0xf6 }; - BYTE buf[16]; - - ret = CryptHashPublicKeyInfo(0, 0, 0, X509_ASN_ENCODING, &info, buf, - &len); - ok(ret, "CryptHashPublicKeyInfo failed: %08x\n", GetLastError()); - ok(!memcmp(buf, emptyHash, len), "Unexpected hash\n"); + ok(len == 16, "Expected hash size 16, got %d\n", len); + if (len == 16) + { + static const BYTE emptyHash[] = { 0xb8,0x51,0x3a,0x31,0x0e,0x9f,0x40, + 0x36,0x9c,0x92,0x45,0x1b,0x9d,0xc8,0xf9,0xf6 }; + BYTE buf[16]; + + ret = CryptHashPublicKeyInfo(0, 0, 0, X509_ASN_ENCODING, &info, buf, + &len); + ok(ret, "CryptHashPublicKeyInfo failed: %08x\n", GetLastError()); + ok(!memcmp(buf, emptyHash, len), "Unexpected hash\n"); + } } } @@ -2651,8 +2660,14 @@ static void testHashToBeSigned(void) /* Signing a cert works */ ret = CryptHashToBeSigned(0, X509_ASN_ENCODING, md5SignedEmptyCert, sizeof(md5SignedEmptyCert), NULL, &size); - ok(ret, "CryptHashToBeSigned failed: %08x\n", GetLastError()); - ok(size == sizeof(md5SignedEmptyCertHash), "unexpected size %d\n", size); + ok(ret || + broken(!ret), /* win9x */ + "CryptHashToBeSigned failed: %08x\n", GetLastError()); + if (ret) + { + ok(size == sizeof(md5SignedEmptyCertHash), "unexpected size %d\n", size); + } + ret = CryptHashToBeSigned(0, X509_ASN_ENCODING, md5SignedEmptyCert, sizeof(md5SignedEmptyCert), hash, &size); ok(!memcmp(hash, md5SignedEmptyCertHash, size), "unexpected value\n"); @@ -2893,13 +2908,21 @@ static void testAcquireCertPrivateKey(void) /* Don't cache provider */ ret = pCryptAcquireCertificatePrivateKey(cert, 0, NULL, &certCSP, &keySpec, &callerFree); - ok(ret, "CryptAcquireCertificatePrivateKey failed: %08x\n", + ok(ret || + broken(!ret), /* win95 */ + "CryptAcquireCertificatePrivateKey failed: %08x\n", GetLastError()); - ok(callerFree, "Expected callerFree to be TRUE\n"); - CryptReleaseContext(certCSP, 0); + if (ret) + { + ok(callerFree, "Expected callerFree to be TRUE\n"); + CryptReleaseContext(certCSP, 0); + } + ret = pCryptAcquireCertificatePrivateKey(cert, 0, NULL, &certCSP, NULL, NULL); - ok(ret, "CryptAcquireCertificatePrivateKey failed: %08x\n", + ok(ret || + broken(!ret), /* win95 */ + "CryptAcquireCertificatePrivateKey failed: %08x\n", GetLastError()); CryptReleaseContext(certCSP, 0); @@ -2907,21 +2930,30 @@ static void testAcquireCertPrivateKey(void) ret = pCryptAcquireCertificatePrivateKey(cert, CRYPT_ACQUIRE_USE_PROV_INFO_FLAG, NULL, &certCSP, &keySpec, &callerFree); - ok(ret, "CryptAcquireCertificatePrivateKey failed: %08x\n", + ok(ret || + broken(!ret), /* win95 */ + "CryptAcquireCertificatePrivateKey failed: %08x\n", GetLastError()); - ok(callerFree, "Expected callerFree to be TRUE\n"); - CryptReleaseContext(certCSP, 0); + if (ret) + { + ok(callerFree, "Expected callerFree to be TRUE\n"); + CryptReleaseContext(certCSP, 0); + } /* Cache it (and check that it's cached) */ ret = pCryptAcquireCertificatePrivateKey(cert, CRYPT_ACQUIRE_CACHE_FLAG, NULL, &certCSP, &keySpec, &callerFree); - ok(ret, "CryptAcquireCertificatePrivateKey failed: %08x\n", + ok(ret || + broken(!ret), /* win95 */ + "CryptAcquireCertificatePrivateKey failed: %08x\n", GetLastError()); ok(!callerFree, "Expected callerFree to be FALSE\n"); size = sizeof(keyContext); ret = CertGetCertificateContextProperty(cert, CERT_KEY_CONTEXT_PROP_ID, &keyContext, &size); - ok(ret, "CertGetCertificateContextProperty failed: %08x\n", + ok(ret || + broken(!ret), /* win95 */ + "CertGetCertificateContextProperty failed: %08x\n", GetLastError()); /* Remove the cached provider */ @@ -2936,13 +2968,17 @@ static void testAcquireCertPrivateKey(void) ret = pCryptAcquireCertificatePrivateKey(cert, CRYPT_ACQUIRE_USE_PROV_INFO_FLAG, NULL, &certCSP, &keySpec, &callerFree); - ok(ret, "CryptAcquireCertificatePrivateKey failed: %08x\n", + ok(ret || + broken(!ret), /* win95 */ + "CryptAcquireCertificatePrivateKey failed: %08x\n", GetLastError()); ok(!callerFree, "Expected callerFree to be FALSE\n"); size = sizeof(keyContext); ret = CertGetCertificateContextProperty(cert, CERT_KEY_CONTEXT_PROP_ID, &keyContext, &size); - ok(ret, "CertGetCertificateContextProperty failed: %08x\n", + ok(ret || + broken(!ret), /* win95 */ + "CertGetCertificateContextProperty failed: %08x\n", GetLastError()); CryptReleaseContext(certCSP, 0); diff --git a/dlls/d3d8/vertexshader.c b/dlls/d3d8/vertexshader.c index 89555bd7d98..3af93b48898 100644 --- a/dlls/d3d8/vertexshader.c +++ b/dlls/d3d8/vertexshader.c @@ -70,7 +70,8 @@ static HRESULT WINAPI IDirect3DVertexShader8Impl_GetDevice(IDirect3DVertexShader HRESULT hr = D3D_OK; TRACE("(%p) : Relay\n", This); - if (D3D_OK == (hr = IWineD3DVertexShader_GetDevice(This->wineD3DVertexShader, &myDevice) && myDevice != NULL)) { + hr = IWineD3DVertexShader_GetDevice(This->wineD3DVertexShader, &myDevice); + if (D3D_OK == hr && myDevice != NULL) { hr = IWineD3DDevice_GetParent(myDevice, (IUnknown **)ppDevice); IWineD3DDevice_Release(myDevice); } else { diff --git a/dlls/d3d9/vertexshader.c b/dlls/d3d9/vertexshader.c index c41b2c4f74f..d40d0a5799e 100644 --- a/dlls/d3d9/vertexshader.c +++ b/dlls/d3d9/vertexshader.c @@ -73,7 +73,8 @@ static HRESULT WINAPI IDirect3DVertexShader9Impl_GetDevice(LPDIRECT3DVERTEXSHADE TRACE("(%p) : Relay\n", This); EnterCriticalSection(&d3d9_cs); - if (D3D_OK == (hr = IWineD3DVertexShader_GetDevice(This->wineD3DVertexShader, &myDevice) && myDevice != NULL)) { + hr = IWineD3DVertexShader_GetDevice(This->wineD3DVertexShader, &myDevice); + if (D3D_OK == hr && myDevice != NULL) { hr = IWineD3DDevice_GetParent(myDevice, (IUnknown **)ppDevice); IWineD3DDevice_Release(myDevice); } else { diff --git a/dlls/ddraw/ddraw.c b/dlls/ddraw/ddraw.c index 9fdbd27ff1a..3af4da47c49 100644 --- a/dlls/ddraw/ddraw.c +++ b/dlls/ddraw/ddraw.c @@ -1842,7 +1842,7 @@ D3D7CB_CreateSurface(IUnknown *device, { ICOM_THIS_FROM(IDirectDrawImpl, IDirectDraw7, device); IDirectDrawSurfaceImpl *surf = NULL; - int i = 0; + UINT i = 0; DDSCAPS2 searchcaps = This->tex_root->surface_desc.ddsCaps; TRACE("(%p) call back. surf=%p. Face %d level %d\n", device, This->tex_root, Face, level); diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c index 84d55e08090..cb0bda51448 100644 --- a/dlls/ddraw/device.c +++ b/dlls/ddraw/device.c @@ -1165,7 +1165,7 @@ IDirect3DDeviceImpl_7_EnumTextureFormats(IDirect3DDevice7 *iface, ICOM_THIS_FROM(IDirect3DDeviceImpl, IDirect3DDevice7, iface); HRESULT hr; WINED3DDISPLAYMODE mode; - int i; + unsigned int i; WINED3DFORMAT FormatList[] = { /* 32 bit */ @@ -1328,7 +1328,7 @@ IDirect3DDeviceImpl_2_EnumTextureFormats(IDirect3DDevice2 *iface, { ICOM_THIS_FROM(IDirect3DDeviceImpl, IDirect3DDevice2, iface); HRESULT hr; - int i; + unsigned int i; WINED3DDISPLAYMODE mode; WINED3DFORMAT FormatList[] = { @@ -3982,7 +3982,7 @@ IDirect3DDeviceImpl_7_DrawPrimitiveStrided(IDirect3DDevice7 *iface, { ICOM_THIS_FROM(IDirect3DDeviceImpl, IDirect3DDevice7, iface); WineDirect3DVertexStridedData WineD3DStrided; - int i; + DWORD i; UINT PrimitiveCount; HRESULT hr; @@ -4160,7 +4160,7 @@ IDirect3DDeviceImpl_7_DrawIndexedPrimitiveStrided(IDirect3DDevice7 *iface, { ICOM_THIS_FROM(IDirect3DDeviceImpl, IDirect3DDevice7, iface); WineDirect3DVertexStridedData WineD3DStrided; - int i; + DWORD i; UINT PrimitiveCount; HRESULT hr; diff --git a/dlls/ddraw/direct3d.c b/dlls/ddraw/direct3d.c index d3ce886c10e..5e21e5befa1 100644 --- a/dlls/ddraw/direct3d.c +++ b/dlls/ddraw/direct3d.c @@ -1138,7 +1138,7 @@ IDirect3DImpl_7_EnumZBufferFormats(IDirect3D7 *iface, { ICOM_THIS_FROM(IDirectDrawImpl, IDirect3D7, iface); HRESULT hr; - int i; + unsigned int i; WINED3DDISPLAYMODE d3ddm; WINED3DDEVTYPE type; diff --git a/dlls/ddraw/utils.c b/dlls/ddraw/utils.c index 937caa4d2da..02d74c739b5 100644 --- a/dlls/ddraw/utils.c +++ b/dlls/ddraw/utils.c @@ -902,7 +902,7 @@ DWORD get_flexible_vertex_size(DWORD d3dvtVertexType) { DWORD size = 0; - int i; + DWORD i; if (d3dvtVertexType & D3DFVF_NORMAL) size += 3 * sizeof(D3DVALUE); if (d3dvtVertexType & D3DFVF_DIFFUSE) size += sizeof(DWORD); diff --git a/dlls/dinput/dinput_main.c b/dlls/dinput/dinput_main.c index 6b52de4a871..6c2a9ed9a20 100644 --- a/dlls/dinput/dinput_main.c +++ b/dlls/dinput/dinput_main.c @@ -213,7 +213,7 @@ static void _dump_EnumDevices_dwFlags(DWORD dwFlags) { } void _dump_diactionformatA(LPDIACTIONFORMATA lpdiActionFormat) { - int i; + unsigned int i; FIXME("diaf.dwSize = %d\n", lpdiActionFormat->dwSize); FIXME("diaf.dwActionSize = %d\n", lpdiActionFormat->dwActionSize); @@ -221,7 +221,7 @@ void _dump_diactionformatA(LPDIACTIONFORMATA lpdiActionFormat) { FIXME("diaf.dwNumActions = %d\n", lpdiActionFormat->dwNumActions); FIXME("diaf.rgoAction = %p\n", lpdiActionFormat->rgoAction); for (i=0;idwNumActions;i++) { - FIXME("diaf.rgoAction[%d]:\n", i); + FIXME("diaf.rgoAction[%u]:\n", i); FIXME("\tuAppData=%lx\n", lpdiActionFormat->rgoAction[i].uAppData); FIXME("\tdwSemantics=%x\n", lpdiActionFormat->rgoAction[i].dwSemantics); FIXME("\tdwFlags=%x\n", lpdiActionFormat->rgoAction[i].dwFlags); @@ -250,8 +250,9 @@ static HRESULT WINAPI IDirectInputAImpl_EnumDevices( { IDirectInputImpl *This = (IDirectInputImpl *)iface; DIDEVICEINSTANCEA devInstance; - int i, j, r; - + unsigned int i; + int j, r; + TRACE("(this=%p,0x%04x '%s',%p,%p,%04x)\n", This, dwDevType, _dump_DIDEVTYPE_value(dwDevType), lpCallback, pvRef, dwFlags); @@ -261,7 +262,7 @@ static HRESULT WINAPI IDirectInputAImpl_EnumDevices( if (!dinput_devices[i]->enum_deviceA) continue; for (j = 0, r = -1; r != 0; j++) { devInstance.dwSize = sizeof(devInstance); - TRACE(" - checking device %d ('%s')\n", i, dinput_devices[i]->name); + TRACE(" - checking device %u ('%s')\n", i, dinput_devices[i]->name); if ((r = dinput_devices[i]->enum_deviceA(dwDevType, dwFlags, &devInstance, This->dwVersion, j))) { if (lpCallback(&devInstance,pvRef) == DIENUM_STOP) return 0; @@ -280,8 +281,9 @@ static HRESULT WINAPI IDirectInputWImpl_EnumDevices( { IDirectInputImpl *This = impl_from_IDirectInput7W( iface ); DIDEVICEINSTANCEW devInstance; - int i, j, r; - + unsigned int i; + int j, r; + TRACE("(this=%p,0x%04x '%s',%p,%p,%04x)\n", This, dwDevType, _dump_DIDEVTYPE_value(dwDevType), lpCallback, pvRef, dwFlags); @@ -291,7 +293,7 @@ static HRESULT WINAPI IDirectInputWImpl_EnumDevices( if (!dinput_devices[i]->enum_deviceW) continue; for (j = 0, r = -1; r != 0; j++) { devInstance.dwSize = sizeof(devInstance); - TRACE(" - checking device %d ('%s')\n", i, dinput_devices[i]->name); + TRACE(" - checking device %u ('%s')\n", i, dinput_devices[i]->name); if ((r = dinput_devices[i]->enum_deviceW(dwDevType, dwFlags, &devInstance, This->dwVersion, j))) { if (lpCallback(&devInstance,pvRef) == DIENUM_STOP) return 0; @@ -479,7 +481,7 @@ static HRESULT WINAPI IDirectInput7AImpl_CreateDeviceEx(LPDIRECTINPUT7A iface, R { IDirectInputImpl *This = (IDirectInputImpl *)iface; HRESULT ret_value = DIERR_DEVICENOTREG; - int i; + unsigned int i; TRACE("(%p)->(%s, %s, %p, %p)\n", This, debugstr_guid(rguid), debugstr_guid(riid), pvOut, lpUnknownOuter); @@ -515,7 +517,7 @@ static HRESULT WINAPI IDirectInput7WImpl_CreateDeviceEx(LPDIRECTINPUT7W iface, R { IDirectInputImpl *This = impl_from_IDirectInput7W( iface ); HRESULT ret_value = DIERR_DEVICENOTREG; - int i; + unsigned int i; TRACE("(%p)->(%s, %s, %p, %p)\n", This, debugstr_guid(rguid), debugstr_guid(riid), pvOut, lpUnknownOuter); diff --git a/dlls/dinput/effect_linuxinput.c b/dlls/dinput/effect_linuxinput.c index 9b1cb1b62ef..3395a37471c 100644 --- a/dlls/dinput/effect_linuxinput.c +++ b/dlls/dinput/effect_linuxinput.c @@ -406,7 +406,7 @@ static HRESULT WINAPI LinuxInputEffectImpl_GetParameters( } if (dwFlags & DIEP_TYPESPECIFICPARAMS) { - int expectedsize = 0; + DWORD expectedsize = 0; if (This->effect.type == FF_PERIODIC) { expectedsize = sizeof(DIPERIODIC); } else if (This->effect.type == FF_CONSTANT) { diff --git a/dlls/dinput/joystick_linux.c b/dlls/dinput/joystick_linux.c index bcac66a338c..4146f1da807 100644 --- a/dlls/dinput/joystick_linux.c +++ b/dlls/dinput/joystick_linux.c @@ -781,7 +781,7 @@ static HRESULT WINAPI JoystickAImpl_SetProperty( LPCDIPROPHEADER ph) { JoystickImpl *This = (JoystickImpl *)iface; - int i; + DWORD i; TRACE("(%p,%s,%p)\n",This,debugstr_guid(rguid),ph); diff --git a/dlls/dinput/joystick_linuxinput.c b/dlls/dinput/joystick_linuxinput.c index 6b3a1869c5a..4dcd61e6168 100644 --- a/dlls/dinput/joystick_linuxinput.c +++ b/dlls/dinput/joystick_linuxinput.c @@ -835,7 +835,7 @@ static HRESULT WINAPI JoystickAImpl_SetProperty(LPDIRECTINPUTDEVICE8A iface, LPCDIPROPRANGE pr = (LPCDIPROPRANGE)ph; if (ph->dwHow == DIPH_DEVICE) { - int i; + DWORD i; TRACE("proprange(%d,%d) all\n", pr->lMin, pr->lMax); for (i = 0; i < This->base.data_format.wine_df->dwNumObjs; i++) { /* Scale dead-zone */ @@ -862,7 +862,7 @@ static HRESULT WINAPI JoystickAImpl_SetProperty(LPDIRECTINPUTDEVICE8A iface, case (DWORD)DIPROP_DEADZONE: { LPCDIPROPDWORD pd = (LPCDIPROPDWORD)ph; if (ph->dwHow == DIPH_DEVICE) { - int i; + DWORD i; TRACE("deadzone(%d) all\n", pd->dwData); for (i = 0; i < This->base.data_format.wine_df->dwNumObjs; i++) { This->props[i].lDeadZone = pd->dwData; @@ -893,7 +893,7 @@ static HRESULT WINAPI JoystickAImpl_SetProperty(LPDIRECTINPUTDEVICE8A iface, LPCDIPROPDWORD pd = (LPCDIPROPDWORD)ph; if (ph->dwHow == DIPH_DEVICE) { - int i; + DWORD i; TRACE("saturation(%d) all\n", pd->dwData); for (i = 0; i < This->base.data_format.wine_df->dwNumObjs; i++) diff --git a/dlls/dplayx/tests/dplayx.c b/dlls/dplayx/tests/dplayx.c index 345647ac670..7a0c657f7ce 100644 --- a/dlls/dplayx/tests/dplayx.c +++ b/dlls/dplayx/tests/dplayx.c @@ -6218,21 +6218,34 @@ static void test_remote_data_replication(void) START_TEST(dplayx) { + if (!winetest_interactive) + { + skip("Run in interacive mode to run dplayx tests.\n"); + return; + } + CoInitialize( NULL ); + trace("Running in interactive mode, tests will take a while\n"); + test_DirectPlayCreate(); test_EnumConnections(); test_InitializeConnection(); test_GetCaps(); + /* test_Open() takes almost a minute, */ test_Open(); + /* test_EnumSession takes three minutes */ test_EnumSessions(); test_SessionDesc(); + /* test_CreatePlayer() takes over a minute */ test_CreatePlayer(); test_GetPlayerCaps(); test_PlayerData(); test_PlayerName(); + + /* test_GetPlayerAccount() takes over 30s */ test_GetPlayerAccount(); test_GetPlayerAddress(); test_GetPlayerFlags(); diff --git a/dlls/gdi32/tests/brush.c b/dlls/gdi32/tests/brush.c index 3d96a3409fa..70d608f7110 100644 --- a/dlls/gdi32/tests/brush.c +++ b/dlls/gdi32/tests/brush.c @@ -52,7 +52,9 @@ static void test_solidbrush(void) if(stock[i].stockobj != -1) { stockBrush = (HBRUSH)GetStockObject(stock[i].stockobj); - ok(stockBrush!=solidBrush, "Stock %s brush equals solid %s brush\n", stock[i].name, stock[i].name); + ok(stockBrush!=solidBrush || + broken(stockBrush==solidBrush), /* win9x does return stock object */ + "Stock %s brush equals solid %s brush\n", stock[i].name, stock[i].name); } else stockBrush = NULL; @@ -70,7 +72,10 @@ static void test_solidbrush(void) } DeleteObject(solidBrush); - ok(GetObject(solidBrush, sizeof(br), &br)==0, "GetObject succeeded on a deleted %s brush\n", stock[i].name); + ret = GetObject(solidBrush, sizeof(br), &br); + ok(ret==0 || + broken(ret!=0), /* win9x */ + "GetObject succeeded on a deleted %s brush\n", stock[i].name); } } diff --git a/dlls/gdi32/tests/pen.c b/dlls/gdi32/tests/pen.c index 8b2e41a575a..144875b36c9 100644 --- a/dlls/gdi32/tests/pen.c +++ b/dlls/gdi32/tests/pen.c @@ -70,7 +70,7 @@ static void test_logpen(void) for (i = 0; i < sizeof(pen)/sizeof(pen[0]); i++) { - trace("testing style %u\n", pen[i].style); + trace("%d: testing style %u\n", i, pen[i].style); /********************** cosmetic pens **********************/ /* CreatePenIndirect behaviour */ @@ -144,6 +144,8 @@ static void test_logpen(void) /* for some reason XP differentiates PS_NULL here */ if (pen[i].style == PS_NULL) { + todo_wine + ok(hpen == GetStockObject(NULL_PEN), "hpen should be a stock NULL_PEN\n"); ok(size == sizeof(EXTLOGPEN), "GetObject returned %d, error %d\n", size, GetLastError()); ok(elp.elpPenStyle == pen[i].ret_style, "expected %u, got %u\n", pen[i].ret_style, elp.elpPenStyle); ok(elp.elpWidth == 0, "expected 0, got %u\n", elp.elpWidth); @@ -206,7 +208,11 @@ static void test_logpen(void) obj_type = GetObjectType(hpen); /* for some reason XP differentiates PS_NULL here */ if (pen[i].style == PS_NULL) + { ok(obj_type == OBJ_PEN, "wrong object type %u\n", obj_type); + todo_wine + ok(hpen == GetStockObject(NULL_PEN), "hpen should be a stock NULL_PEN\n"); + } else ok(obj_type == OBJ_EXTPEN, "wrong object type %u\n", obj_type); diff --git a/dlls/gdiplus/brush.c b/dlls/gdiplus/brush.c index d08fdabb031..8bf09efb257 100644 --- a/dlls/gdiplus/brush.c +++ b/dlls/gdiplus/brush.c @@ -480,7 +480,7 @@ GpStatus WINGDIPAPI GdipCreateTextureIA(GpImage *image, HDC hdc; OLE_HANDLE hbm; HBITMAP old = NULL; - BITMAPINFO bmi; + BITMAPINFO *pbmi; BITMAPINFOHEADER *bmih; INT n_x, n_y, n_width, n_height, abs_height, stride, image_stride, i, bytespp; BOOL bm_is_selected; @@ -512,8 +512,11 @@ GpStatus WINGDIPAPI GdipCreateTextureIA(GpImage *image, IPicture_get_CurDC(image->picture, &hdc); bm_is_selected = (hdc != 0); - bmi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER); - bmi.bmiHeader.biBitCount = 0; + pbmi = GdipAlloc(sizeof(BITMAPINFOHEADER) + 256 * sizeof(RGBQUAD)); + if (!pbmi) + return OutOfMemory; + pbmi->bmiHeader.biSize = sizeof(BITMAPINFOHEADER); + pbmi->bmiHeader.biBitCount = 0; if(!bm_is_selected){ hdc = CreateCompatibleDC(0); @@ -521,32 +524,37 @@ GpStatus WINGDIPAPI GdipCreateTextureIA(GpImage *image, } /* fill out bmi */ - GetDIBits(hdc, (HBITMAP)hbm, 0, 0, NULL, &bmi, DIB_RGB_COLORS); + GetDIBits(hdc, (HBITMAP)hbm, 0, 0, NULL, pbmi, DIB_RGB_COLORS); - bytespp = bmi.bmiHeader.biBitCount / 8; - abs_height = abs(bmi.bmiHeader.biHeight); + bytespp = pbmi->bmiHeader.biBitCount / 8; + abs_height = abs(pbmi->bmiHeader.biHeight); - if(n_x > bmi.bmiHeader.biWidth || n_x + n_width > bmi.bmiHeader.biWidth || - n_y > abs_height || n_y + n_height > abs_height) + if(n_x > pbmi->bmiHeader.biWidth || n_x + n_width > pbmi->bmiHeader.biWidth || + n_y > abs_height || n_y + n_height > abs_height){ + GdipFree(pbmi); return InvalidParameter; + } - dibits = GdipAlloc(bmi.bmiHeader.biSizeImage); + dibits = GdipAlloc(pbmi->bmiHeader.biSizeImage); if(dibits) /* this is not a good place to error out */ - GetDIBits(hdc, (HBITMAP)hbm, 0, abs_height, dibits, &bmi, DIB_RGB_COLORS); + GetDIBits(hdc, (HBITMAP)hbm, 0, abs_height, dibits, pbmi, DIB_RGB_COLORS); if(!bm_is_selected){ SelectObject(hdc, old); DeleteDC(hdc); } - if(!dibits) + if(!dibits){ + GdipFree(pbmi); return OutOfMemory; + } - image_stride = (bmi.bmiHeader.biWidth * bytespp + 3) & ~3; + image_stride = (pbmi->bmiHeader.biWidth * bytespp + 3) & ~3; stride = (n_width * bytespp + 3) & ~3; buff = GdipAlloc(sizeof(BITMAPINFOHEADER) + stride * n_height); if(!buff){ + GdipFree(pbmi); GdipFree(dibits); return OutOfMemory; } @@ -558,25 +566,31 @@ GpStatus WINGDIPAPI GdipCreateTextureIA(GpImage *image, bmih->biHeight = n_height; bmih->biCompression = BI_RGB; bmih->biSizeImage = stride * n_height; - bmih->biBitCount = bmi.bmiHeader.biBitCount; + bmih->biBitCount = pbmi->bmiHeader.biBitCount; bmih->biClrUsed = 0; bmih->biPlanes = 1; /* image is flipped */ - if(bmi.bmiHeader.biHeight > 0){ - dibits += bmi.bmiHeader.biSizeImage; + if(pbmi->bmiHeader.biHeight > 0){ + dibits += pbmi->bmiHeader.biSizeImage; image_stride *= -1; textbits += stride * (n_height - 1); stride *= -1; } + GdipFree(pbmi); + for(i = 0; i < n_height; i++) memcpy(&textbits[i * stride], &dibits[n_x * bytespp + (n_y + i) * image_stride], abs(stride)); *texture = GdipAlloc(sizeof(GpTexture)); - if (!*texture) return OutOfMemory; + if (!*texture){ + GdipFree(dibits); + GdipFree(buff); + return OutOfMemory; + } if((status = GdipCreateMatrix(&(*texture)->transform)) != Ok){ GdipFree(*texture); diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec index 0faf01beb93..8d13a19d730 100644 --- a/dlls/gdiplus/gdiplus.spec +++ b/dlls/gdiplus/gdiplus.spec @@ -427,8 +427,8 @@ @ stub GdipIsVisibleClipEmpty @ stdcall GdipIsVisiblePathPoint(ptr long long ptr ptr) @ stdcall GdipIsVisiblePathPointI(ptr long long ptr ptr) -@ stub GdipIsVisiblePoint -@ stub GdipIsVisiblePointI +@ stdcall GdipIsVisiblePoint(ptr long long ptr) +@ stdcall GdipIsVisiblePointI(ptr long long ptr) @ stub GdipIsVisibleRect @ stub GdipIsVisibleRectI @ stub GdipIsVisibleRegionPoint @@ -508,7 +508,7 @@ @ stdcall GdipSetAdjustableArrowCapWidth(ptr long) @ stub GdipSetClipGraphics @ stub GdipSetClipHrgn -@ stub GdipSetClipPath +@ stdcall GdipSetClipPath(ptr ptr long) @ stdcall GdipSetClipRect(ptr long long long long long) @ stdcall GdipSetClipRectI(ptr long long long long long) @ stdcall GdipSetClipRegion(ptr ptr long) diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c index b36e31c4b13..03b0994e959 100644 --- a/dlls/gdiplus/graphics.c +++ b/dlls/gdiplus/graphics.c @@ -2583,6 +2583,32 @@ GpStatus WINGDIPAPI GdipIsClipEmpty(GpGraphics *graphics, BOOL *res) return GdipIsEmptyRegion(graphics->clip, graphics, res); } +GpStatus WINGDIPAPI GdipIsVisiblePoint(GpGraphics *graphics, REAL x, REAL y, BOOL *result) +{ + FIXME("(%p, %.2f, %.2f, %p) stub\n", graphics, x, y, result); + + if(!graphics || !result) + return InvalidParameter; + + if(graphics->busy) + return ObjectBusy; + + return NotImplemented; +} + +GpStatus WINGDIPAPI GdipIsVisiblePointI(GpGraphics *graphics, INT x, INT y, BOOL *result) +{ + FIXME("(%p, %d, %d, %p) stub\n", graphics, x, y, result); + + if(!graphics || !result) + return InvalidParameter; + + if(graphics->busy) + return ObjectBusy; + + return NotImplemented; +} + GpStatus WINGDIPAPI GdipMeasureCharacterRanges(GpGraphics* graphics, GDIPCONST WCHAR* string, INT length, GDIPCONST GpFont* font, GDIPCONST RectF* layoutRect, GDIPCONST GpStringFormat *stringFormat, @@ -2948,6 +2974,19 @@ GpStatus WINGDIPAPI GdipTranslateWorldTransform(GpGraphics *graphics, REAL dx, return GdipTranslateMatrix(graphics->worldtrans, dx, dy, order); } +GpStatus WINGDIPAPI GdipSetClipPath(GpGraphics *graphics, GpPath *path, CombineMode mode) +{ + TRACE("(%p, %p, %d)\n", graphics, path, mode); + + if(!graphics) + return InvalidParameter; + + if(graphics->busy) + return ObjectBusy; + + return GdipCombineRegionPath(graphics->clip, path, mode); +} + GpStatus WINGDIPAPI GdipSetClipRect(GpGraphics *graphics, REAL x, REAL y, REAL width, REAL height, CombineMode mode) diff --git a/dlls/gdiplus/image.c b/dlls/gdiplus/image.c index 2172b51aa4d..9e3fd622b72 100644 --- a/dlls/gdiplus/image.c +++ b/dlls/gdiplus/image.c @@ -98,7 +98,7 @@ GpStatus WINGDIPAPI GdipBitmapLockBits(GpBitmap* bitmap, GDIPCONST GpRect* rect, OLE_HANDLE hbm; HDC hdc; HBITMAP old = NULL; - BITMAPINFO bmi; + BITMAPINFO *pbmi; BYTE *buff = NULL; UINT abs_height; GpRect act_rect; /* actual rect to be used */ @@ -131,8 +131,11 @@ GpStatus WINGDIPAPI GdipBitmapLockBits(GpBitmap* bitmap, GDIPCONST GpRect* rect, IPicture_get_CurDC(bitmap->image.picture, &hdc); bm_is_selected = (hdc != 0); - bmi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER); - bmi.bmiHeader.biBitCount = 0; + pbmi = GdipAlloc(sizeof(BITMAPINFOHEADER) + 256 * sizeof(RGBQUAD)); + if (!pbmi) + return OutOfMemory; + pbmi->bmiHeader.biSize = sizeof(BITMAPINFOHEADER); + pbmi->bmiHeader.biBitCount = 0; if(!bm_is_selected){ hdc = CreateCompatibleDC(0); @@ -140,33 +143,35 @@ GpStatus WINGDIPAPI GdipBitmapLockBits(GpBitmap* bitmap, GDIPCONST GpRect* rect, } /* fill out bmi */ - GetDIBits(hdc, (HBITMAP)hbm, 0, 0, NULL, &bmi, DIB_RGB_COLORS); + GetDIBits(hdc, (HBITMAP)hbm, 0, 0, NULL, pbmi, DIB_RGB_COLORS); - abs_height = abs(bmi.bmiHeader.biHeight); - stride = bmi.bmiHeader.biWidth * bitspp / 8; + abs_height = abs(pbmi->bmiHeader.biHeight); + stride = pbmi->bmiHeader.biWidth * bitspp / 8; stride = (stride + 3) & ~3; buff = GdipAlloc(stride * abs_height); - bmi.bmiHeader.biBitCount = bitspp; + pbmi->bmiHeader.biBitCount = bitspp; if(buff) - GetDIBits(hdc, (HBITMAP)hbm, 0, abs_height, buff, &bmi, DIB_RGB_COLORS); + GetDIBits(hdc, (HBITMAP)hbm, 0, abs_height, buff, pbmi, DIB_RGB_COLORS); if(!bm_is_selected){ SelectObject(hdc, old); DeleteDC(hdc); } - if(!buff) + if(!buff){ + GdipFree(pbmi); return OutOfMemory; + } lockeddata->Width = act_rect.Width; lockeddata->Height = act_rect.Height; lockeddata->PixelFormat = format; lockeddata->Reserved = flags; - if(bmi.bmiHeader.biHeight > 0){ + if(pbmi->bmiHeader.biHeight > 0){ lockeddata->Stride = -stride; lockeddata->Scan0 = buff + (bitspp / 8) * act_rect.X + stride * (abs_height - 1 - act_rect.Y); @@ -181,6 +186,7 @@ GpStatus WINGDIPAPI GdipBitmapLockBits(GpBitmap* bitmap, GDIPCONST GpRect* rect, bitmap->bitmapbits = buff; + GdipFree(pbmi); return Ok; } @@ -191,7 +197,7 @@ GpStatus WINGDIPAPI GdipBitmapUnlockBits(GpBitmap* bitmap, HDC hdc; HBITMAP old = NULL; BOOL bm_is_selected; - BITMAPINFO bmi; + BITMAPINFO *pbmi; if(!bitmap || !lockeddata) return InvalidParameter; @@ -215,24 +221,26 @@ GpStatus WINGDIPAPI GdipBitmapUnlockBits(GpBitmap* bitmap, IPicture_get_CurDC(bitmap->image.picture, &hdc); bm_is_selected = (hdc != 0); - bmi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER); - bmi.bmiHeader.biBitCount = 0; + pbmi = GdipAlloc(sizeof(BITMAPINFOHEADER) + 256 * sizeof(RGBQUAD)); + pbmi->bmiHeader.biSize = sizeof(BITMAPINFOHEADER); + pbmi->bmiHeader.biBitCount = 0; if(!bm_is_selected){ hdc = CreateCompatibleDC(0); old = SelectObject(hdc, (HBITMAP)hbm); } - GetDIBits(hdc, (HBITMAP)hbm, 0, 0, NULL, &bmi, DIB_RGB_COLORS); - bmi.bmiHeader.biBitCount = PIXELFORMATBPP(lockeddata->PixelFormat); - SetDIBits(hdc, (HBITMAP)hbm, 0, abs(bmi.bmiHeader.biHeight), - bitmap->bitmapbits, &bmi, DIB_RGB_COLORS); + GetDIBits(hdc, (HBITMAP)hbm, 0, 0, NULL, pbmi, DIB_RGB_COLORS); + pbmi->bmiHeader.biBitCount = PIXELFORMATBPP(lockeddata->PixelFormat); + SetDIBits(hdc, (HBITMAP)hbm, 0, abs(pbmi->bmiHeader.biHeight), + bitmap->bitmapbits, pbmi, DIB_RGB_COLORS); if(!bm_is_selected){ SelectObject(hdc, old); DeleteDC(hdc); } + GdipFree(pbmi); GdipFree(bitmap->bitmapbits); bitmap->bitmapbits = NULL; bitmap->lockmode = 0; @@ -966,13 +974,19 @@ GpStatus WINGDIPAPI GdipLoadImageFromStream(IStream* stream, GpImage **image) IPicture_get_Type(pic, &type); if(type == PICTYPE_BITMAP){ - BITMAPINFO bmi; + BITMAPINFO *pbmi; BITMAPCOREHEADER* bmch; OLE_HANDLE hbm; HDC hdc; + pbmi = GdipAlloc(sizeof(BITMAPINFOHEADER) + 256 * sizeof(RGBQUAD)); + if (!pbmi) + return OutOfMemory; *image = GdipAlloc(sizeof(GpBitmap)); - if(!*image) return OutOfMemory; + if(!*image){ + GdipFree(pbmi); + return OutOfMemory; + } (*image)->type = ImageTypeBitmap; (*((GpBitmap**) image))->width = ipicture_pixel_width(pic); @@ -982,22 +996,22 @@ GpStatus WINGDIPAPI GdipLoadImageFromStream(IStream* stream, GpImage **image) IPicture_get_Handle(pic, &hbm); IPicture_get_CurDC(pic, &hdc); - ZeroMemory(&bmi, sizeof(bmi)); - bmch = (BITMAPCOREHEADER*) (&bmi.bmiHeader); + bmch = (BITMAPCOREHEADER*) (&pbmi->bmiHeader); bmch->bcSize = sizeof(BITMAPCOREHEADER); if(!hdc){ HBITMAP old; hdc = CreateCompatibleDC(0); old = SelectObject(hdc, (HBITMAP)hbm); - GetDIBits(hdc, (HBITMAP)hbm, 0, 0, NULL, &bmi, DIB_RGB_COLORS); + GetDIBits(hdc, (HBITMAP)hbm, 0, 0, NULL, pbmi, DIB_RGB_COLORS); SelectObject(hdc, old); DeleteDC(hdc); } else - GetDIBits(hdc, (HBITMAP)hbm, 0, 0, NULL, &bmi, DIB_RGB_COLORS); + GetDIBits(hdc, (HBITMAP)hbm, 0, 0, NULL, pbmi, DIB_RGB_COLORS); (*((GpBitmap**) image))->format = (bmch->bcBitCount << 8) | PixelFormatGDI; + GdipFree(pbmi); } else if(type == PICTYPE_METAFILE || type == PICTYPE_ENHMETAFILE){ /* FIXME: missing initialization code */ diff --git a/dlls/gdiplus/tests/graphics.c b/dlls/gdiplus/tests/graphics.c index c000843525c..1b4e3104aff 100644 --- a/dlls/gdiplus/tests/graphics.c +++ b/dlls/gdiplus/tests/graphics.c @@ -487,6 +487,7 @@ static void test_Get_Release_DC(void) GpRect rect[2]; GpRegion *clip; INT i; + BOOL res; pt[0].X = 10; pt[0].Y = 10; @@ -674,6 +675,10 @@ static void test_Get_Release_DC(void) expect(ObjectBusy, status); status = Ok; status = GdipGraphicsClear(graphics, 0xdeadbeef); expect(ObjectBusy, status); status = Ok; + status = GdipIsVisiblePoint(graphics, 0.0, 0.0, &res); + expect(ObjectBusy, status); status = Ok; + status = GdipIsVisiblePointI(graphics, 0, 0, &res); + expect(ObjectBusy, status); status = Ok; /* GdipMeasureCharacterRanges */ /* GdipMeasureString */ status = GdipResetClip(graphics); @@ -706,6 +711,8 @@ static void test_Get_Release_DC(void) expect(ObjectBusy, status); status = Ok; status = GdipTranslateWorldTransform(graphics, 0.0, 0.0, MatrixOrderPrepend); expect(ObjectBusy, status); status = Ok; + status = GdipSetClipPath(graphics, path, CombineModeReplace); + expect(ObjectBusy, status); status = Ok; status = GdipSetClipRect(graphics, 0.0, 0.0, 10.0, 10.0, CombineModeReplace); expect(ObjectBusy, status); status = Ok; status = GdipSetClipRectI(graphics, 0, 0, 10, 10, CombineModeReplace); @@ -804,6 +811,11 @@ static void test_get_set_clip(void) status = GdipSetClipRegion(graphics, NULL, CombineModeReplace); expect(InvalidParameter, status); + status = GdipSetClipPath(NULL, NULL, CombineModeReplace); + expect(InvalidParameter, status); + status = GdipSetClipPath(graphics, NULL, CombineModeReplace); + expect(InvalidParameter, status); + res = FALSE; status = GdipGetClip(graphics, clip); expect(Ok, status); diff --git a/dlls/inetmib1/tests/main.c b/dlls/inetmib1/tests/main.c index 6eead89f700..d4d6f161b6b 100644 --- a/dlls/inetmib1/tests/main.c +++ b/dlls/inetmib1/tests/main.c @@ -53,7 +53,7 @@ static void testQuery(void) { BOOL (WINAPI *pQuery)(BYTE, SnmpVarBindList *, AsnInteger32 *, AsnInteger32 *); - BOOL ret, moreData; + BOOL ret, moreData, noChange; SnmpVarBindList list; AsnInteger32 error, index; UINT bogus[] = { 1,2,3,4 }; @@ -157,6 +157,7 @@ static void testQuery(void) SnmpUtilOidCpy(&vars2[2].name, &vars[2].name); list.list = vars2; moreData = TRUE; + noChange = FALSE; entry = 0; do { SetLastError(0xdeadbeef); @@ -180,6 +181,15 @@ static void testQuery(void) else if (SnmpUtilOidNCmp(&vars2[2].name, &vars[2].name, vars[2].name.idLength)) moreData = FALSE; + else if (!SnmpUtilOidCmp(&vars[0].name, &vars2[0].name) || + !SnmpUtilOidCmp(&vars[0].name, &vars2[0].name) || + !SnmpUtilOidCmp(&vars[0].name, &vars2[0].name)) + { + /* If the OID isn't modified, the function isn't implemented on this + * platform, skip the remaining tests. + */ + noChange = TRUE; + } if (moreData) { UINT lastID; @@ -224,7 +234,9 @@ static void testQuery(void) "expected a value of 0, 1, or 2, got %u\n", vars2[2].value.asnValue.unsigned32); } - } while (moreData); + else if (noChange) + skip("no change in OID, no MIB2 IF table implementation\n"); + } while (moreData && !noChange); SnmpUtilVarBindFree(&vars2[0]); SnmpUtilVarBindFree(&vars2[1]); SnmpUtilVarBindFree(&vars2[2]); @@ -240,6 +252,7 @@ static void testQuery(void) list.len = 1; list.list = vars2; moreData = TRUE; + noChange = FALSE; ret = pQuery(SNMP_PDU_GETNEXT, &list, &error, &index); ok(ret, "SnmpExtensionQuery failed: %d\n", GetLastError()); ok(error == SNMP_ERRORSTATUS_NOERROR, @@ -272,6 +285,13 @@ static void testQuery(void) else if (SnmpUtilOidNCmp(&vars2[0].name, &vars[0].name, vars[0].name.idLength)) moreData = FALSE; + else if (!SnmpUtilOidCmp(&vars2[0].name, &vars[0].name)) + { + /* If the OID isn't modified, the function isn't implemented on this + * platform, skip the remaining tests. + */ + noChange = TRUE; + } if (moreData) { /* Make sure the size of the OID is right. @@ -304,7 +324,9 @@ static void testQuery(void) } } } - } while (moreData); + else if (noChange) + skip("no change in OID, no MIB2 IP address table implementation\n"); + } while (moreData && !noChange); SnmpUtilVarBindFree(&vars2[0]); /* Check the type and OIDs of the IP route table */ @@ -315,6 +337,7 @@ static void testQuery(void) list.len = 1; list.list = vars2; moreData = TRUE; + noChange = FALSE; do { ret = pQuery(SNMP_PDU_GETNEXT, &list, &error, &index); ok(ret, "SnmpExtensionQuery failed: %d\n", GetLastError()); @@ -328,6 +351,13 @@ static void testQuery(void) else if (SnmpUtilOidNCmp(&vars2[0].name, &vars[0].name, vars[0].name.idLength)) moreData = FALSE; + else if (!SnmpUtilOidCmp(&vars2[0].name, &vars[0].name)) + { + /* If the OID isn't modified, the function isn't implemented on this + * platform, skip the remaining tests. + */ + noChange = TRUE; + } if (moreData) { /* Make sure the size of the OID is right. @@ -360,7 +390,9 @@ static void testQuery(void) } } } - } while (moreData); + else if (noChange) + skip("no change in OID, no MIB2 IP route table implementation\n"); + } while (moreData && !noChange); SnmpUtilVarBindFree(&vars2[0]); /* Check the type and OIDs of the UDP table */ @@ -371,6 +403,7 @@ static void testQuery(void) list.len = 1; list.list = vars2; moreData = TRUE; + noChange = FALSE; do { ret = pQuery(SNMP_PDU_GETNEXT, &list, &error, &index); ok(ret, "SnmpExtensionQuery failed: %d\n", GetLastError()); @@ -392,6 +425,13 @@ static void testQuery(void) else if (SnmpUtilOidNCmp(&vars2[0].name, &vars[0].name, vars[0].name.idLength)) moreData = FALSE; + else if (!SnmpUtilOidCmp(&vars2[0].name, &vars[0].name)) + { + /* If the OID isn't modified, the function isn't implemented on this + * platform, skip the remaining tests. + */ + noChange = TRUE; + } if (moreData) { /* Make sure the size of the OID is right. */ @@ -422,7 +462,9 @@ static void testQuery(void) } } } - } while (moreData); + else if (noChange) + skip("no change in OID, no MIB2 UDP table implementation\n"); + } while (moreData && !noChange); SnmpUtilVarBindFree(&vars2[0]); } diff --git a/dlls/jscript/jsutils.c b/dlls/jscript/jsutils.c index 32b877be5cc..c6f4b9c934a 100644 --- a/dlls/jscript/jsutils.c +++ b/dlls/jscript/jsutils.c @@ -458,7 +458,7 @@ HRESULT to_string(script_ctx_t *ctx, VARIANT *v, jsexcept_t *ei, BSTR *str) HRESULT hres; V_VT(&strv) = VT_EMPTY; - hres = VariantChangeType(&strv, v, 0, VT_BSTR); + hres = VariantChangeTypeEx(&strv, v, MAKELCID(MAKELANGID(LANG_ENGLISH,SUBLANG_ENGLISH_US),SORT_DEFAULT), 0, VT_BSTR); if(FAILED(hres)) return hres; diff --git a/dlls/jscript/string.c b/dlls/jscript/string.c index fc40462b1b3..11ef882d902 100644 --- a/dlls/jscript/string.c +++ b/dlls/jscript/string.c @@ -530,7 +530,7 @@ static HRESULT rep_call(DispatchEx *func, const WCHAR *str, match_result_t *matc static HRESULT String_replace(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS *dp, VARIANT *retv, jsexcept_t *ei, IServiceProvider *caller) { - DWORD parens_cnt, parens_size=0, rep_len=0, length; + DWORD parens_cnt = 0, parens_size=0, rep_len=0, length; BSTR rep_str = NULL, match_str = NULL, ret_str; DispatchEx *rep_func = NULL, *regexp = NULL; match_result_t *parens = NULL, match; diff --git a/dlls/msacm32/msacm_Ja.rc b/dlls/msacm32/msacm_Ja.rc index 3b15f5a075e..8efd28f8de0 100644 --- a/dlls/msacm32/msacm_Ja.rc +++ b/dlls/msacm32/msacm_Ja.rc @@ -23,7 +23,7 @@ LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT DLG_ACMFORMATCHOOSE_ID DIALOG DISCARDABLE 10, 20, 225, 100 STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "ƒTƒEƒ“ƒh‚Ì‘I‘ð" -FONT 9, "MS UI Gothic" +FONT 9, "MS Shell Dlg" BEGIN LTEXT "–¼‘O(&N):", -1, 5, 5, 115, 8, NOT WS_GROUP diff --git a/dlls/mshtml/Ja.rc b/dlls/mshtml/Ja.rc new file mode 100644 index 00000000000..562bc175e29 --- /dev/null +++ b/dlls/mshtml/Ja.rc @@ -0,0 +1,55 @@ +/* + * Copyright 2005-2006 Jacek Caban + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + + +LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT + +STRINGTABLE DISCARDABLE +{ + IDS_HTMLDISABLED "HTML ƒŒƒ“ƒ_ƒŠƒ“ƒO‚ÍŒ»�Ý�A–³Œø‚Å‚·�B" + IDS_HTMLDOCUMENT "HTML •¶�‘" + IDS_DOWNLOADING "ƒ_ƒEƒ“ƒ��[ƒh‚µ‚Ä‚¢‚Ü‚·..." + IDS_INSTALLING "ƒCƒ“ƒXƒg�[ƒ‹‚µ‚Ä‚¢‚Ü‚·..." +} + +ID_DWL_DIALOG DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 260, 85 +STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Wine Gecko ƒCƒ“ƒXƒg�[ƒ‰" +FONT 9, "MS Shell Dlg" +{ + LTEXT "‚±‚̃AƒvƒŠƒP�[ƒVƒ‡ƒ“‚Í HTML ƒy�[ƒW‚ð•\\Ž¦‚µ‚悤‚Æ‚µ‚Ä‚¢‚Ü‚·�Bƒy�[ƒW‚ð•\\Ž¦‚·‚é‚É‚Í Wine ‚É" \ + "Gecko�iMozilla ‚Ì HTML ƒGƒ“ƒWƒ“�j‚ðƒCƒ“ƒXƒg�[ƒ‹‚·‚é•K—v‚ª‚ ‚è‚Ü‚·�BWine ‚ªŽ©“®“I‚É Gecko ‚ðƒ_ƒEƒ“ƒ��[ƒh‚µƒCƒ“ƒXƒg�[ƒ‹‚·‚é‚悤‚É‚µ‚½‚¢‚È‚ç‚Î" \ + " [ƒCƒ“ƒXƒg�[ƒ‹] ‚ðƒNƒŠƒbƒN‚µ‚Ä‚­‚¾‚³‚¢�B", ID_DWL_STATUS, 10, 10, 240, 30, SS_LEFT + CONTROL "Progress", ID_DWL_PROGRESS, PROGRESS_CLASSA, WS_BORDER|PBS_SMOOTH, 10, 40, 240, 12 + DEFPUSHBUTTON "ƒCƒ“ƒXƒg�[ƒ‹(&I)", ID_DWL_INSTALL, 200, 60, 50, 15, WS_GROUP | WS_TABSTOP + PUSHBUTTON "ƒLƒƒƒ“ƒZƒ‹(&C)", IDCANCEL, 140, 60, 50, 15, WS_GROUP | WS_TABSTOP +} + +IDD_HYPERLINK DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 250, 65 +STYLE DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "ƒnƒCƒp�[ƒŠƒ“ƒN" +FONT 9, "MS Shell Dlg" +{ + GROUPBOX "ƒnƒCƒp�[ƒŠƒ“ƒN‚Ì�î•ñ", IDC_STATIC, 5, 5, 190, 55 + LTEXT "Ží—Þ(&T):", IDC_STATIC, 10, 22, 20, 10 + COMBOBOX IDC_TYPE, 35, 20, 45, 100, WS_TABSTOP | WS_GROUP | WS_VSCROLL | CBS_DROPDOWNLIST | CBS_HASSTRINGS + LTEXT "&URL:", IDC_STATIC, 10, 42, 20, 10 + EDITTEXT IDC_URL, 35, 40, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_GROUP | WS_TABSTOP + PUSHBUTTON "OK", IDOK, 200, 10, 45, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP + PUSHBUTTON "ƒLƒƒƒ“ƒZƒ‹", IDCANCEL, 200, 28, 45, 14, WS_GROUP | WS_TABSTOP +} diff --git a/dlls/mshtml/rsrc.rc b/dlls/mshtml/rsrc.rc index 4b6a8cbf043..b932fb9da64 100644 --- a/dlls/mshtml/rsrc.rc +++ b/dlls/mshtml/rsrc.rc @@ -41,6 +41,7 @@ #include "Fi.rc" #include "Fr.rc" #include "Hu.rc" +#include "Ja.rc" #include "Ko.rc" #include "Nl.rc" #include "No.rc" diff --git a/dlls/mshtml/task.c b/dlls/mshtml/task.c index 93edd650304..a1c8da98402 100644 --- a/dlls/mshtml/task.c +++ b/dlls/mshtml/task.c @@ -261,6 +261,8 @@ static void set_parsecomplete(HTMLDocument *doc) call_property_onchanged(&doc->cp_propnotif, 1005); call_explorer_69(doc); + /* FIXME: IE7 calls EnableModelless(TRUE), EnableModelless(FALSE) and sets interactive state here */ + doc->readystate = READYSTATE_INTERACTIVE; call_property_onchanged(&doc->cp_propnotif, DISPID_READYSTATE); diff --git a/dlls/mshtml/tests/htmldoc.c b/dlls/mshtml/tests/htmldoc.c index 00d682c7a92..a8f1e30732c 100644 --- a/dlls/mshtml/tests/htmldoc.c +++ b/dlls/mshtml/tests/htmldoc.c @@ -70,6 +70,7 @@ DEFINE_OLEGUID(CGID_DocHostCmdPriv, 0x000214D4L, 0, 0); static IOleDocumentView *view = NULL; static HWND container_hwnd = NULL, hwnd = NULL, last_hwnd = NULL; +static BOOL show_fail; DEFINE_EXPECT(LockContainer); DEFINE_EXPECT(SetActiveObject); @@ -138,6 +139,10 @@ DEFINE_EXPECT(RequestUIActivate); DEFINE_EXPECT(InPlaceFrame_SetBorderSpace); DEFINE_EXPECT(InPlaceUIWindow_SetActiveObject); DEFINE_EXPECT(GetExternal); +DEFINE_EXPECT(EnableModeless_TRUE); +DEFINE_EXPECT(EnableModeless_FALSE); +DEFINE_EXPECT(Frame_EnableModeless_TRUE); +DEFINE_EXPECT(Frame_EnableModeless_FALSE); static IUnknown *doc_unk; static BOOL expect_LockContainer_fLock; @@ -651,11 +656,13 @@ static HRESULT WINAPI PropertyNotifySink_OnChanged(IPropertyNotifySink *iface, D readystate_set_loading = FALSE; load_state = LD_LOADING; } - test_readyState(NULL); + if(!editmode || load_state != LD_LOADING || !called_Exec_Explorer_69) + test_readyState(NULL); return S_OK; case 1005: CHECK_EXPECT(OnChanged_1005); - test_readyState(NULL); + if(!editmode) + test_readyState(NULL); load_state = LD_INTERACTIVE; return S_OK; } @@ -1308,7 +1315,10 @@ static HRESULT WINAPI InPlaceFrame_SetStatusText(IOleInPlaceFrame *iface, LPCOLE static HRESULT WINAPI InPlaceFrame_EnableModeless(IOleInPlaceFrame *iface, BOOL fEnable) { - ok(0, "unexpected call\n"); + if(fEnable) + CHECK_EXPECT(Frame_EnableModeless_TRUE); + else + CHECK_EXPECT(Frame_EnableModeless_FALSE); return E_NOTIMPL; } @@ -1728,6 +1738,14 @@ static HRESULT WINAPI DocumentSite_ActivateMe(IOleDocumentSite *iface, IOleDocum expect_status_text = (load_state == LD_COMPLETE ? (LPCOLESTR)0xdeadbeef : NULL); hres = IOleDocumentView_Show(view, TRUE); + if(FAILED(hres)) { + win_skip("Show failed\n"); + if(activeobj) + IOleInPlaceActiveObject_Release(activeobj); + IOleDocument_Release(document); + show_fail = TRUE; + return S_OK; + } ok(hres == S_OK, "Show failed: %08x\n", hres); CHECK_CALLED(CanInPlaceActivate); @@ -1922,7 +1940,10 @@ static HRESULT WINAPI DocHostUIHandler_UpdateUI(IDocHostUIHandler2 *iface) static HRESULT WINAPI DocHostUIHandler_EnableModeless(IDocHostUIHandler2 *iface, BOOL fEnable) { - ok(0, "unexpected call\n"); + if(fEnable) + CHECK_EXPECT(EnableModeless_TRUE); + else + CHECK_EXPECT(EnableModeless_FALSE); return E_NOTIMPL; } @@ -2725,6 +2746,10 @@ static void test_download(BOOL verb_done, BOOL css_dwl, BOOL css_try_dwl) SET_EXPECT(UnlockRequest); } SET_EXPECT(Exec_Explorer_69); + SET_EXPECT(EnableModeless_TRUE); /* IE7 */ + SET_EXPECT(Frame_EnableModeless_TRUE); /* IE7 */ + SET_EXPECT(EnableModeless_FALSE); /* IE7 */ + SET_EXPECT(Frame_EnableModeless_FALSE); /* IE7 */ SET_EXPECT(OnChanged_1005); SET_EXPECT(OnChanged_READYSTATE); SET_EXPECT(Exec_SETPROGRESSPOS); @@ -2732,6 +2757,7 @@ static void test_download(BOOL verb_done, BOOL css_dwl, BOOL css_try_dwl) SET_EXPECT(Exec_ShellDocView_103); SET_EXPECT(Exec_MSHTML_PARSECOMPLETE); SET_EXPECT(Exec_HTTPEQUIV_DONE); + SET_EXPECT(SetStatusText); expect_status_text = (LPWSTR)0xdeadbeef; /* TODO */ while(!called_Exec_HTTPEQUIV_DONE && GetMessage(&msg, NULL, 0, 0)) { @@ -2772,6 +2798,10 @@ static void test_download(BOOL verb_done, BOOL css_dwl, BOOL css_try_dwl) } } SET_CALLED(Exec_Explorer_69); + SET_CALLED(EnableModeless_TRUE); /* IE7 */ + SET_CALLED(Frame_EnableModeless_TRUE); /* IE7 */ + SET_CALLED(EnableModeless_FALSE); /* IE7 */ + SET_CALLED(Frame_EnableModeless_FALSE); /* IE7 */ CHECK_CALLED(OnChanged_1005); CHECK_CALLED(OnChanged_READYSTATE); CHECK_CALLED(Exec_SETPROGRESSPOS); @@ -2779,6 +2809,7 @@ static void test_download(BOOL verb_done, BOOL css_dwl, BOOL css_try_dwl) SET_CALLED(Exec_ShellDocView_103); CHECK_CALLED(Exec_MSHTML_PARSECOMPLETE); CHECK_CALLED(Exec_HTTPEQUIV_DONE); + SET_CALLED(SetStatusText); load_state = LD_COMPLETE; @@ -3777,7 +3808,7 @@ static void test_HTMLDocument(BOOL do_load) test_OnAmbientPropertyChange2(unk); hres = test_Activate(unk, CLIENTSITE_EXPECTPATH); - if(FAILED(hres)) { + if(FAILED(hres) || show_fail) { IUnknown_Release(unk); return; } @@ -3873,6 +3904,10 @@ static void test_HTMLDocument_hlink(void) test_GetCurMoniker(unk, NULL, NULL); test_Persist(unk); test_Navigate(unk); + if(show_fail) { + IUnknown_Release(unk); + return; + } test_download(FALSE, TRUE, TRUE); @@ -3919,6 +3954,11 @@ static void test_HTMLDocument_StreamLoad(void) test_ConnectionPointContainer(unk); test_ClientSite(oleobj, CLIENTSITE_EXPECTPATH); test_DoVerb(oleobj); + if(show_fail) { + IUnknown_Release(unk); + IOleObject_Release(oleobj); + return; + } test_MSHTML_QueryStatus(unk, OLECMDF_SUPPORTED); IOleObject_Release(oleobj); @@ -3994,6 +4034,11 @@ static void test_editing_mode(BOOL do_load) test_ConnectionPointContainer(unk); test_ClientSite(oleobj, CLIENTSITE_EXPECTPATH); test_DoVerb(oleobj); + if(show_fail) { + IOleObject_Release(oleobj); + IUnknown_Release(unk); + return; + } test_edit_uiactivate(oleobj); test_MSHTML_QueryStatus(unk, OLECMDF_SUPPORTED); @@ -4007,7 +4052,11 @@ static void test_editing_mode(BOOL do_load) test_MSHTML_QueryStatus(unk, OLECMDF_SUPPORTED); test_download(TRUE, do_load, do_load); + + SET_EXPECT(SetStatusText); /* ignore race in native mshtml */ test_timer(EXPECT_UPDATEUI); + SET_CALLED(SetStatusText); + test_MSHTML_QueryStatus(unk, OLECMDF_SUPPORTED|OLECMDF_ENABLED); if(!do_load) { diff --git a/dlls/msi/tests/install.c b/dlls/msi/tests/install.c index 3f2b0fcbd6a..410ac9355e8 100644 --- a/dlls/msi/tests/install.c +++ b/dlls/msi/tests/install.c @@ -3068,6 +3068,7 @@ static void test_publish_processcomponents(void) LPSTR usersid; CHAR val[MAX_PATH]; CHAR keypath[MAX_PATH]; + CHAR program_files_maximus[MAX_PATH]; static const CHAR keyfmt[] = "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\" @@ -3104,8 +3105,12 @@ static void test_publish_processcomponents(void) res = RegQueryValueExA(comp, "84A88FD7F6998CE40A22FB59F6B9C2BB", NULL, NULL, (LPBYTE)val, &size); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - ok(!lstrcmpA(val, "C:\\Program Files\\msitest\\maximus"), - "Expected \"%s\", got \"%s\"\n", "C:\\Program Files\\msitest\\maximus", val); + + lstrcpyA(program_files_maximus,PROG_FILES_DIR); + lstrcatA(program_files_maximus,"\\msitest\\maximus"); + + ok(!lstrcmpA(val, program_files_maximus), + "Expected \"%s\", got \"%s\"\n", program_files_maximus, val); res = RegOpenKeyA(HKEY_LOCAL_MACHINE, compkey, &hkey); ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); @@ -3148,8 +3153,8 @@ static void test_publish_processcomponents(void) res = RegQueryValueExA(comp, "84A88FD7F6998CE40A22FB59F6B9C2BB", NULL, NULL, (LPBYTE)val, &size); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - ok(!lstrcmpA(val, "C:\\Program Files\\msitest\\maximus"), - "Expected \"%s\", got \"%s\"\n", "C:\\Program Files\\msitest\\maximus", val); + ok(!lstrcmpA(val, program_files_maximus), + "Expected \"%s\", got \"%s\"\n", program_files_maximus, val); res = RegOpenKeyA(HKEY_LOCAL_MACHINE, compkey, &hkey); ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); diff --git a/dlls/msi/tests/package.c b/dlls/msi/tests/package.c index 2ef86d9ccbd..0ed3c5cb763 100644 --- a/dlls/msi/tests/package.c +++ b/dlls/msi/tests/package.c @@ -7823,7 +7823,8 @@ static void _test_file_access(LPCSTR file, const struct access_res *ares, DWORD line, idx, ares[idx].gothandle, (hfile != INVALID_HANDLE_VALUE)); - ok(lasterr == ares[idx].lasterr, + ok(lasterr == ares[idx].lasterr || + lasterr == 0xdeadbeef, /* win9x */ "(%d, lasterr, %d): Expected %d, got %d\n", line, idx, ares[idx].lasterr, lasterr); diff --git a/dlls/ole32/tests/clipboard.c b/dlls/ole32/tests/clipboard.c index ee912ce773e..e714064b55d 100644 --- a/dlls/ole32/tests/clipboard.c +++ b/dlls/ole32/tests/clipboard.c @@ -359,7 +359,10 @@ static void test_get_clipboard(void) InitFormatEtc(fmtetc, CF_TEXT, TYMED_HGLOBAL); fmtetc.lindex = 256; hr = IDataObject_QueryGetData(data_obj, &fmtetc); - ok(hr == DV_E_FORMATETC, "IDataObject_QueryGetData should have failed with DV_E_FORMATETC instead of 0x%08x\n", hr); + ok(hr == DV_E_FORMATETC || broken(hr == S_OK), + "IDataObject_QueryGetData should have failed with DV_E_FORMATETC instead of 0x%08x\n", hr); + if (hr == S_OK) + ReleaseStgMedium(&stgmedium); InitFormatEtc(fmtetc, CF_TEXT, TYMED_HGLOBAL); fmtetc.cfFormat = CF_RIFF; @@ -398,7 +401,13 @@ static void test_get_clipboard(void) fmtetc.lindex = 256; hr = IDataObject_GetData(data_obj, &fmtetc, &stgmedium); todo_wine - ok(hr == DV_E_FORMATETC, "IDataObject_GetData should have failed with DV_E_FORMATETC instead of 0x%08x\n", hr); + ok(hr == DV_E_FORMATETC || broken(hr == S_OK), "IDataObject_GetData should have failed with DV_E_FORMATETC instead of 0x%08x\n", hr); + if (hr == S_OK) + { + /* undo the unexpected success */ + DataObjectImpl_GetData_calls--; + ReleaseStgMedium(&stgmedium); + } InitFormatEtc(fmtetc, CF_TEXT, TYMED_HGLOBAL); fmtetc.cfFormat = CF_RIFF; diff --git a/dlls/ole32/tests/dragdrop.c b/dlls/ole32/tests/dragdrop.c index 15610661c29..ad10a58b1e5 100644 --- a/dlls/ole32/tests/dragdrop.c +++ b/dlls/ole32/tests/dragdrop.c @@ -108,16 +108,40 @@ static const IDropTargetVtbl DropTarget_VTbl = static IDropTarget DropTarget = { &DropTarget_VTbl }; +static ATOM register_dummy_class(void) +{ + WNDCLASS wc = + { + 0, + DefWindowProc, + 0, + 0, + GetModuleHandle(NULL), + NULL, + LoadCursor(NULL, IDC_ARROW), + (HBRUSH)(COLOR_BTNFACE+1), + NULL, + TEXT("WineOleTestClass"), + }; + + return RegisterClass(&wc); +} + START_TEST(dragdrop) { HRESULT hr; + HWND hwnd; + + hwnd = CreateWindow(MAKEINTATOM(register_dummy_class()), "Test", 0, + CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, NULL, + NULL, NULL, NULL); - hr = RegisterDragDrop(GetDesktopWindow(), &DropTarget); + hr = RegisterDragDrop(hwnd, &DropTarget); ok(hr == E_OUTOFMEMORY, "RegisterDragDrop without OLE initialized should have returned E_OUTOFMEMORY instead of 0x%08x\n", hr); OleInitialize(NULL); - hr = RegisterDragDrop(GetDesktopWindow(), NULL); + hr = RegisterDragDrop(hwnd, NULL); ok(hr == E_INVALIDARG, "RegisterDragDrop with NULL IDropTarget * should return E_INVALIDARG instead of 0x%08x\n", hr); hr = RegisterDragDrop(NULL, &DropTarget); @@ -127,21 +151,23 @@ START_TEST(dragdrop) ok(hr == DRAGDROP_E_INVALIDHWND, "RegisterDragDrop with garbage hwnd should return DRAGDROP_E_INVALIDHWND instead of 0x%08x\n", hr); ok(droptarget_addref_called == 0, "DropTarget_AddRef shouldn't have been called\n"); - hr = RegisterDragDrop(GetDesktopWindow(), &DropTarget); + hr = RegisterDragDrop(hwnd, &DropTarget); ok_ole_success(hr, "RegisterDragDrop"); ok(droptarget_addref_called == 1, "DropTarget_AddRef should have been called once, not %d times\n", droptarget_addref_called); - hr = RegisterDragDrop(GetDesktopWindow(), &DropTarget); + hr = RegisterDragDrop(hwnd, &DropTarget); ok(hr == DRAGDROP_E_ALREADYREGISTERED, "RegisterDragDrop with already registered hwnd should return DRAGDROP_E_ALREADYREGISTERED instead of 0x%08x\n", hr); ok(droptarget_release_called == 0, "DropTarget_Release shouldn't have been called\n"); OleUninitialize(); ok(droptarget_release_called == 0, "DropTarget_Release shouldn't have been called\n"); - hr = RevokeDragDrop(GetDesktopWindow()); + hr = RevokeDragDrop(hwnd); ok_ole_success(hr, "RevokeDragDrop"); ok(droptarget_release_called == 1, "DropTarget_Release should have been called once, not %d times\n", droptarget_release_called); hr = RevokeDragDrop(NULL); ok(hr == DRAGDROP_E_INVALIDHWND, "RevokeDragDrop with NULL hwnd should return DRAGDROP_E_INVALIDHWND instead of 0x%08x\n", hr); + + DestroyWindow(hwnd); } diff --git a/dlls/oledlg/insobjdlg.c b/dlls/oledlg/insobjdlg.c index e8750487e40..07c8a812615 100644 --- a/dlls/oledlg/insobjdlg.c +++ b/dlls/oledlg/insobjdlg.c @@ -340,7 +340,7 @@ static BOOL UIINSERTOBJECTDLG_PopulateObjectTypes(InsertObjectDlgInfo* pdlgInfo) HKEY hkclsids; HKEY hkey; CLSID clsid; - HRESULT ret; + LSTATUS ret; WCHAR keydesc[MAX_PATH]; WCHAR keyname[MAX_PATH]; WCHAR szclsid[128]; diff --git a/dlls/oledlg/oledlg_Ja.rc b/dlls/oledlg/oledlg_Ja.rc index a412f7d86b2..f96e327d687 100644 --- a/dlls/oledlg/oledlg_Ja.rc +++ b/dlls/oledlg/oledlg_Ja.rc @@ -21,7 +21,7 @@ LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT UIINSERTOBJECT DIALOG DISCARDABLE 0, 0, 294, 151 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "ƒIƒuƒWƒFƒNƒg‚Ì‘}“ü" -FONT 9, "MS UI Gothic" +FONT 9, "MS Shell Dlg" BEGIN LISTBOX IDC_OBJTYPELIST,82,19,131,66,LBS_SORT | LBS_NOINTEGRALHEIGHT | WS_VISIBLE | WS_VSCROLL | diff --git a/dlls/opengl32/make_opengl b/dlls/opengl32/make_opengl index 2fb447b16b0..b4ae68090ee 100755 --- a/dlls/opengl32/make_opengl +++ b/dlls/opengl32/make_opengl @@ -226,7 +226,7 @@ sub GenerateThunk($$$$$) $ret = "$ret */\n"; } $ret = $ret . ConvertType($func_ref->[1]) . " WINAPI wine_$func_ref->[0]( "; - for (my $i = 0; $i <= $#{@{$func_ref->[2]}}; $i++) { + for (my $i = 0; $i < @{$func_ref->[2]}; $i++) { ## Quick debug code :-) ## print $func_ref->[2]->[$i]->[1] . "\n"; my $type = $func_ref->[2]->[$i]->[0]; @@ -238,7 +238,7 @@ sub GenerateThunk($$$$$) } else { $trace_arg = "$trace_arg$debug_conv{$type}"; } - if ($i != $#{@{$func_ref->[2]}}) { + if ($i+1 < @{$func_ref->[2]}) { $ret = "$ret, "; $call_arg = "$call_arg, "; $trace_arg = "$trace_arg, "; @@ -247,7 +247,7 @@ sub GenerateThunk($$$$$) $call_arg = "$call_arg "; } } - $ret .= 'void ' if ($#{@{$func_ref->[2]}} < 0); + $ret .= 'void ' if (!@{$func_ref->[2]}); $ret = "$ret) {\n"; if ($func_ref->[1] ne "void") { $ret = "$ret " . ConvertType($func_ref->[1]) . " ret_value;\n"; @@ -560,7 +560,7 @@ while (my $line = ) { # Now, build the argument reference my $arg_ref = [ ]; - for (my $i = 0; $i <= $#arg_names; $i++) { + for (my $i = 0; $i < @arg_names; $i++) { unless (defined($arg_types{$arg_names[$i]})) { print "@arg_names\n"; foreach (sort keys %arg_types) { @@ -600,7 +600,7 @@ open(SPEC, ">$spec_file"); foreach (sort keys %norm_functions) { my $func_name = $norm_functions{$_}->[0]; print SPEC "@ stdcall $func_name( "; - for (my $i = 0; $i <= $#{@{$norm_functions{$_}->[2]}}; $i++) { + for (my $i = 0; $i < @{$norm_functions{$_}->[2]}; $i++) { my $type = $norm_functions{$_}->[2]->[$i]->[0]; if ($type =~ /\*/) { print SPEC "ptr "; @@ -687,16 +687,16 @@ my $pos = 0; foreach (sort keys %ext_functions) { my $func_ref = $ext_functions{$_}; my $local_var = " " . ConvertType($func_ref->[1]) . " (*$ext_prefix$func_ref->[0])( "; - for (my $i = 0; $i <= $#{@{$func_ref->[2]}}; $i++) { + for (my $i = 0; $i < @{$func_ref->[2]}; $i++) { my $type = ConvertType($func_ref->[2]->[$i]->[0]); $local_var .= "$type"; - if ($i != $#{@{$func_ref->[2]}}) { + if ($i+1 < @{$func_ref->[2]}) { $local_var .= ", "; } else { $local_var .= " "; } } - $local_var .= 'void ' if ($#{@{$func_ref->[2]}} < 0); + $local_var .= 'void ' if (!@{$func_ref->[2]}); $local_var .= ") = extension_funcs[$pos];\n"; $pos++; print EXT "\nstatic ", GenerateThunk($ext_functions{$_}, 0, $ext_prefix, $gen_thread_safe, $local_var); diff --git a/dlls/opengl32/tests/opengl.c b/dlls/opengl32/tests/opengl.c index e72d1a07624..65c47c603f9 100644 --- a/dlls/opengl32/tests/opengl.c +++ b/dlls/opengl32/tests/opengl.c @@ -22,6 +22,11 @@ #include #include "wine/test.h" +const unsigned char * WINAPI glGetString(unsigned int); +#define GL_VENDOR 0x1F00 +#define GL_RENDERER 0x1F01 +#define GL_VERSION 0x1F02 + #define MAX_FORMATS 256 typedef void* HPBUFFERARB; @@ -269,10 +274,6 @@ static void test_makecurrent(HDC winhdc) { BOOL ret; HGLRC hglrc; - HDC hdc; - - hdc = GetDC(0); - ok( hdc != 0, "GetDC(0) failed\n" ); hglrc = wglCreateContext(winhdc); ok( hglrc != 0, "wglCreateContext failed\n" ); @@ -281,15 +282,6 @@ static void test_makecurrent(HDC winhdc) ok( ret, "wglMakeCurrent failed\n" ); ok( wglGetCurrentContext() == hglrc, "wrong context\n" ); - - SetLastError( 0xdeadbeef ); - ret = wglMakeCurrent( hdc, hglrc ); - ok( !ret, "wglMakeCurrent succeeded\n" ); - ok( GetLastError() == ERROR_INVALID_PIXEL_FORMAT, "last error %u\n", GetLastError() ); - - ok( wglGetCurrentContext() == hglrc, "wrong context\n" ); - - ReleaseDC( 0, hdc ); } static void test_colorbits(HDC hdc) @@ -432,6 +424,14 @@ START_TEST(opengl) 0, 0, 0 /* layer masks */ }; + init_functions(); + /* The lack of wglGetExtensionsStringARB in general means broken software rendering or the lack of decent OpenGL support, skip tests in such cases */ + if (!pwglGetExtensionsStringARB) + { + skip("wglGetExtensionsStringARB is not available\n"); + return; + } + hwnd = CreateWindow("static", "Title", WS_OVERLAPPEDWINDOW, 10, 10, 200, 200, NULL, NULL, NULL, NULL); ok(hwnd != NULL, "err: %d\n", GetLastError()); @@ -462,20 +462,18 @@ START_TEST(opengl) hglrc = wglCreateContext(hdc); res = wglMakeCurrent(hdc, hglrc); ok(res, "wglMakeCurrent failed!\n"); - init_functions(); + if(res) + { + trace("OpenGL renderer: %s\n", glGetString(GL_RENDERER)); + trace("OpenGL driver version: %s\n", glGetString(GL_VERSION)); + trace("OpenGL vendor: %s\n", glGetString(GL_VENDOR)); + } test_makecurrent(hdc); test_setpixelformat(hdc); test_colorbits(hdc); test_gdi_dbuf(hdc); - if (!pwglGetExtensionsStringARB) - { - skip("wglGetExtensionsStringARB is not available\n"); - DestroyWindow(hwnd); - return; - } - wgl_extensions = pwglGetExtensionsStringARB(hdc); if(wgl_extensions == NULL) skip("Skipping opengl32 tests because this OpenGL implementation doesn't support WGL extensions!\n"); diff --git a/dlls/riched20/tests/editor.c b/dlls/riched20/tests/editor.c index 41dce8615c1..649d7e7e3b6 100644 --- a/dlls/riched20/tests/editor.c +++ b/dlls/riched20/tests/editor.c @@ -392,7 +392,6 @@ static void line_scroll(HWND hwnd, int amount) static void test_EM_SCROLLCARET(void) { int prevY, curY; - HWND hwndRichEdit = new_richedit(NULL); const char text[] = "aa\n" "this is a long line of text that should be longer than the " "control's width\n" @@ -402,6 +401,14 @@ static void test_EM_SCROLLCARET(void) "ff\n" "gg\n" "hh\n"; + /* The richedit window height needs to be large enough vertically to fit in + * more than two lines of text, so the new_richedit function can't be used + * since a height of 60 was not large enough on some systems. + */ + HWND hwndRichEdit = CreateWindow(RICHEDIT_CLASS, NULL, + ES_MULTILINE|WS_POPUP|WS_HSCROLL|WS_VSCROLL|WS_VISIBLE, + 0, 0, 200, 80, NULL, NULL, hmoduleRichEdit, NULL); + ok(hwndRichEdit != NULL, "class: %s, error: %d\n", RICHEDIT_CLASS, (int) GetLastError()); /* Can't verify this */ SendMessage(hwndRichEdit, EM_SCROLLCARET, 0, 0); @@ -1101,6 +1108,7 @@ static void test_SETPARAFORMAT(void) HWND hwndRichEdit = new_richedit(NULL); PARAFORMAT2 fmt; HRESULT ret; + LONG expectedMask = PFM_ALL2 & ~PFM_TABLEROWDELIMITER; fmt.cbSize = sizeof(PARAFORMAT2); fmt.dwMask = PFM_ALIGNMENT; fmt.wAlignment = PFA_LEFT; @@ -1111,8 +1119,14 @@ static void test_SETPARAFORMAT(void) fmt.cbSize = sizeof(PARAFORMAT2); fmt.dwMask = -1; ret = SendMessage(hwndRichEdit, EM_GETPARAFORMAT, 0, (LPARAM) &fmt); - ok(ret == PFM_ALL2, "expected %x got %x\n", PFM_ALL2, ret); - ok(fmt.dwMask == PFM_ALL2, "expected %x got %x\n", PFM_ALL2, fmt.dwMask); + /* Ignore the PFM_TABLEROWDELIMITER bit because it changes + * between richedit different native builds of riched20.dll + * used on different Windows versions. */ + ret &= ~PFM_TABLEROWDELIMITER; + fmt.dwMask &= ~PFM_TABLEROWDELIMITER; + + ok(ret == expectedMask, "expected %x got %x\n", expectedMask, ret); + ok(fmt.dwMask == expectedMask, "expected %x got %x\n", expectedMask, fmt.dwMask); DestroyWindow(hwndRichEdit); } diff --git a/dlls/secur32/tests/main.c b/dlls/secur32/tests/main.c index 359bcc7f14b..e652485859b 100644 --- a/dlls/secur32/tests/main.c +++ b/dlls/secur32/tests/main.c @@ -143,8 +143,17 @@ static void testEnumerateSecurityPackages(void) "EnumerateSecurityPackages() should return %d, not %08x\n", SEC_E_OK, sec_status); - ok(num_packages > 0, "Number of sec packages should be > 0 ,but is %d\n", - num_packages); + if (num_packages == 0) + { + todo_wine + ok(num_packages > 0, "Number of sec packages should be > 0 ,but is %d\n", + num_packages); + skip("no sec packages to check\n"); + return; + } + else + ok(num_packages > 0, "Number of sec packages should be > 0 ,but is %d\n", + num_packages); ok(pkg_info != NULL, "pkg_info should not be NULL after EnumerateSecurityPackages\n"); diff --git a/dlls/secur32/tests/secur32.c b/dlls/secur32/tests/secur32.c index 955d7bfdf31..5bdb914e04c 100644 --- a/dlls/secur32/tests/secur32.c +++ b/dlls/secur32/tests/secur32.c @@ -56,6 +56,8 @@ static void testGetComputerObjectNameA(void) (GetLastError() == ERROR_INVALID_PARAMETER)) || (GetLastError() == ERROR_CANT_ACCESS_DOMAIN_INFO) || (GetLastError() == ERROR_NO_SUCH_DOMAIN) || + (GetLastError() == ERROR_NO_SUCH_USER) || + (GetLastError() == ERROR_NONE_MAPPED) || (GetLastError() == ERROR_ACCESS_DENIED), "GetComputerObjectNameA(%d) failed: %d\n", formats[i], GetLastError()); @@ -79,6 +81,8 @@ static void testGetComputerObjectNameW(void) (GetLastError() == ERROR_INVALID_PARAMETER)) || (GetLastError() == ERROR_CANT_ACCESS_DOMAIN_INFO) || (GetLastError() == ERROR_NO_SUCH_DOMAIN) || + (GetLastError() == ERROR_NO_SUCH_USER) || + (GetLastError() == ERROR_NONE_MAPPED) || (GetLastError() == ERROR_ACCESS_DENIED), "GetComputerObjectNameW(%d) failed: %d\n", formats[i], GetLastError()); diff --git a/dlls/serialui/Ja.rc b/dlls/serialui/Ja.rc index 6e2f5d3cd09..0df248d8084 100644 --- a/dlls/serialui/Ja.rc +++ b/dlls/serialui/Ja.rc @@ -21,7 +21,7 @@ LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT IDD_SERIALUICONFIG DIALOG DISCARDABLE 0, 0, 160, 159 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE CAPTION "ƒvƒ�ƒpƒeƒB�F" -FONT 9, "MS UI Gothic" +FONT 9, "MS Shell Dlg" BEGIN LTEXT "ƒ{�[ƒŒ�[ƒg", 0,5,20,55,10 COMBOBOX IDC_BAUD, 60, 20, 90, 36, CBS_DROPDOWNLIST|CBS_AUTOHSCROLL|WS_BORDER | WS_VSCROLL | WS_TABSTOP diff --git a/dlls/shdocvw/tests/webbrowser.c b/dlls/shdocvw/tests/webbrowser.c index 86d38dbce30..a203ae19ebc 100644 --- a/dlls/shdocvw/tests/webbrowser.c +++ b/dlls/shdocvw/tests/webbrowser.c @@ -63,6 +63,12 @@ DEFINE_GUID(GUID_NULL,0,0,0,0,0,0,0,0,0,0,0); expect_ ## func = called_ ## func = FALSE; \ }while(0) +#define CHECK_CALLED_BROKEN(func) \ + do { \ + ok(called_ ## func || broken(!called_ ## func), "expected " #func "\n"); \ + expect_ ## func = called_ ## func = FALSE; \ + }while(0) + DEFINE_EXPECT(GetContainer); DEFINE_EXPECT(Site_GetWindow); DEFINE_EXPECT(ShowObject); @@ -240,6 +246,8 @@ static HRESULT WINAPI OleCommandTarget_Exec(IOleCommandTarget *iface, const GUID switch(nCmdID) { case 24: return E_FAIL; /* TODO */ + case 25: + return E_FAIL; /* IE5 */ case 66: return E_FAIL; /* TODO */ default: @@ -1627,13 +1635,13 @@ static void test_ie_funcs(IUnknown *unk) SET_EXPECT(Invoke_WINDOWSETRESIZABLE); hres = IWebBrowser2_put_Resizable(wb, (exvb = VARIANT_TRUE)); - ok(hres == S_OK, "put_Resizable failed: %08x\n", hres); - CHECK_CALLED(Invoke_WINDOWSETRESIZABLE); + ok(hres == S_OK || broken(hres == E_NOTIMPL), "put_Resizable failed: %08x\n", hres); + CHECK_CALLED_BROKEN(Invoke_WINDOWSETRESIZABLE); SET_EXPECT(Invoke_WINDOWSETRESIZABLE); hres = IWebBrowser2_put_Resizable(wb, (exvb = VARIANT_FALSE)); - ok(hres == S_OK, "put_Resizable failed: %08x\n", hres); - CHECK_CALLED(Invoke_WINDOWSETRESIZABLE); + ok(hres == S_OK || broken(hres == E_NOTIMPL), "put_Resizable failed: %08x\n", hres); + CHECK_CALLED_BROKEN(Invoke_WINDOWSETRESIZABLE); hres = IWebBrowser2_get_Resizable(wb, &b); ok(hres == E_NOTIMPL, "get_Resizable failed: %08x\n", hres); @@ -1953,12 +1961,12 @@ static void test_Navigate2(IUnknown *unk) CHECK_CALLED(Invoke_AMBIENT_USERAGENT); CHECK_CALLED(Invoke_AMBIENT_PALETTE); CHECK_CALLED(GetOptionKeyPath); - CHECK_CALLED(GetOverridesKeyPath); + CHECK_CALLED_BROKEN(GetOverridesKeyPath); todo_wine CHECK_CALLED(QueryStatus_SETPROGRESSTEXT); todo_wine CHECK_CALLED(Exec_SETPROGRESSMAX); todo_wine CHECK_CALLED(Exec_SETPROGRESSPOS); - todo_wine CHECK_CALLED(Invoke_SETSECURELOCKICON); - todo_wine CHECK_CALLED(Invoke_FILEDOWNLOAD); + todo_wine CHECK_CALLED_BROKEN(Invoke_SETSECURELOCKICON); + todo_wine CHECK_CALLED_BROKEN(Invoke_FILEDOWNLOAD); todo_wine CHECK_CALLED(Invoke_COMMANDSTATECHANGE); todo_wine CHECK_CALLED(Exec_SETDOWNLOADSTATE_0); CHECK_CALLED(EnableModeless_TRUE); diff --git a/dlls/shlwapi/shlwapi_Ja.rc b/dlls/shlwapi/shlwapi_Ja.rc index dbcc44123ce..debdcf0f798 100644 --- a/dlls/shlwapi/shlwapi_Ja.rc +++ b/dlls/shlwapi/shlwapi_Ja.rc @@ -23,7 +23,7 @@ LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT IDD_ERR_DIALOG DIALOG MOVEABLE DISCARDABLE 0, 0, 220, 60 STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "ƒGƒ‰�[!" -FONT 9, "MS UI Gothic" +FONT 9, "MS Shell Dlg" { LTEXT "", IDS_ERR_USER_MSG2, 15, 5, 28, 20 LTEXT "", IDS_ERR_USER_MSG, 15, 5, 210, 8 diff --git a/dlls/shlwapi/tests/path.c b/dlls/shlwapi/tests/path.c index 0fc092d486b..cc9ded556ca 100644 --- a/dlls/shlwapi/tests/path.c +++ b/dlls/shlwapi/tests/path.c @@ -271,62 +271,34 @@ static void test_PathIsValidCharA(void) BOOL ret; unsigned int c; - ret = pPathIsValidCharA( 0x7f, 0 ); - ok ( !ret, "PathIsValidCharA succeeded: 0x%08x\n", (DWORD)ret ); - - ret = pPathIsValidCharA( 0x7f, 1 ); - ok ( !ret, "PathIsValidCharA succeeded: 0x%08x\n", (DWORD)ret ); - for (c = 0; c < 0x7f; c++) { ret = pPathIsValidCharA( c, ~0U ); - ok ( ret == SHELL_charclass[c] || (ret == 1 && SHELL_charclass[c] == 0xffffffff), - "PathIsValidCharA failed: 0x%02x got 0x%08x expected 0x%08x\n", - c, (DWORD)ret, SHELL_charclass[c] ); + ok ( ret || !SHELL_charclass[c], "PathIsValidCharA failed: 0x%02x got 0x%08x\n", c, ret ); } for (c = 0x7f; c <= 0xff; c++) { ret = pPathIsValidCharA( c, ~0U ); - ok ( ret == 0x00000100, - "PathIsValidCharA failed: 0x%02x got 0x%08x expected 0x00000100\n", - c, (DWORD)ret ); + ok ( ret, "PathIsValidCharA failed: 0x%02x got 0x%08x\n", c, ret ); } } static void test_PathIsValidCharW(void) { BOOL ret; - unsigned int c, err_count = 0; - - ret = pPathIsValidCharW( 0x7f, 0 ); - ok ( !ret, "PathIsValidCharW succeeded: 0x%08x\n", (DWORD)ret ); - - ret = pPathIsValidCharW( 0x7f, 1 ); - ok ( !ret, "PathIsValidCharW succeeded: 0x%08x\n", (DWORD)ret ); + unsigned int c; for (c = 0; c < 0x7f; c++) { ret = pPathIsValidCharW( c, ~0U ); - ok ( ret == SHELL_charclass[c] || (ret == 1 && SHELL_charclass[c] == 0xffffffff), - "PathIsValidCharW failed: 0x%02x got 0x%08x expected 0x%08x\n", - c, (DWORD)ret, SHELL_charclass[c] ); + ok ( ret || !SHELL_charclass[c], "PathIsValidCharW failed: 0x%02x got 0x%08x\n", c, ret ); } for (c = 0x007f; c <= 0xffff; c++) { ret = pPathIsValidCharW( c, ~0U ); - ok ( ret == 0x00000100, - "PathIsValidCharW failed: 0x%02x got 0x%08x expected 0x00000100\n", - c, (DWORD)ret ); - if (ret != 0x00000100) - { - if(++err_count > 100 ) { - trace("skipping rest of PathIsValidCharW tests " - "because of the current number of errors\n"); - break; - } - } + ok ( ret, "PathIsValidCharW failed: 0x%02x got 0x%08x\n", c, ret ); } } diff --git a/dlls/shlwapi/url.c b/dlls/shlwapi/url.c index febf6a790f1..e6289a51151 100644 --- a/dlls/shlwapi/url.c +++ b/dlls/shlwapi/url.c @@ -1589,7 +1589,7 @@ static HRESULT URL_GuessScheme(LPCWSTR pszIn, LPWSTR pszOut, LPDWORD pcchOut) index++; } RegCloseKey(newkey); - return -1; + return E_FAIL; } static HRESULT URL_ApplyDefault(LPCWSTR pszIn, LPWSTR pszOut, LPDWORD pcchOut) @@ -1652,7 +1652,7 @@ HRESULT WINAPI UrlApplySchemeW(LPCWSTR pszIn, LPWSTR pszOut, LPDWORD pcchOut, DW if (res1) { /* no scheme in input, need to see if we need to guess */ if (dwFlags & URL_APPLY_GUESSSCHEME) { - if ((ret = URL_GuessScheme(pszIn, pszOut, pcchOut)) != -1) + if ((ret = URL_GuessScheme(pszIn, pszOut, pcchOut)) != E_FAIL) return ret; } } diff --git a/dlls/urlmon/bindctx.c b/dlls/urlmon/bindctx.c index 328254c3bb6..044b817eda5 100644 --- a/dlls/urlmon/bindctx.c +++ b/dlls/urlmon/bindctx.c @@ -511,7 +511,8 @@ HRESULT WINAPI RegisterBindStatusCallback(IBindCtx *pbc, IBindStatusCallback *pb hres = IBindCtx_RegisterObjectParam(pbc, BSCBHolder, (IUnknown*)bsc); IBindStatusCallback_Release(bsc); if(FAILED(hres)) { - IBindStatusCallback_Release(prev); + if(prev) + IBindStatusCallback_Release(prev); return hres; } diff --git a/dlls/urlmon/tests/protocol.c b/dlls/urlmon/tests/protocol.c index b986dfcbb7f..f6362265a2f 100644 --- a/dlls/urlmon/tests/protocol.c +++ b/dlls/urlmon/tests/protocol.c @@ -1194,7 +1194,7 @@ static void test_priority(IInternetProtocol *protocol) IInternetPriority_Release(priority); } -static void file_protocol_start(IInternetProtocol *protocol, LPCWSTR url, BOOL is_first) +static BOOL file_protocol_start(IInternetProtocol *protocol, LPCWSTR url, BOOL is_first) { HRESULT hres; @@ -1216,6 +1216,10 @@ static void file_protocol_start(IInternetProtocol *protocol, LPCWSTR url, BOOL i expect_hrResult = S_OK; hres = IInternetProtocol_Start(protocol, url, &protocol_sink, &bind_info, 0, 0); + if(hres == INET_E_RESOURCE_NOT_FOUND) { + win_skip("Start failed\n"); + return FALSE; + } ok(hres == S_OK, "Start failed: %08x\n", hres); CHECK_CALLED(GetBindInfo); @@ -1232,6 +1236,8 @@ static void file_protocol_start(IInternetProtocol *protocol, LPCWSTR url, BOOL i CHECK_CALLED(ReportData); if(is_first) CHECK_CALLED(ReportResult); + + return TRUE; } static void test_file_protocol_url(LPCWSTR url) @@ -1261,25 +1267,27 @@ static void test_file_protocol_url(LPCWSTR url) ok(hres == S_OK, "Could not get IInternetProtocol: %08x\n", hres); if(SUCCEEDED(hres)) { - file_protocol_start(protocol, url, TRUE); - hres = IInternetProtocol_Read(protocol, buf, 2, &cb); - ok(hres == S_OK, "Read failed: %08x\n", hres); - ok(cb == 2, "cb=%u expected 2\n", cb); - hres = IInternetProtocol_Read(protocol, buf, sizeof(buf), &cb); - ok(hres == S_FALSE, "Read failed: %08x\n", hres); - hres = IInternetProtocol_Read(protocol, buf, sizeof(buf), &cb); - ok(hres == S_FALSE, "Read failed: %08x expected S_FALSE\n", hres); - ok(cb == 0, "cb=%u expected 0\n", cb); - hres = IInternetProtocol_UnlockRequest(protocol); - ok(hres == S_OK, "UnlockRequest failed: %08x\n", hres); - - file_protocol_start(protocol, url, FALSE); - hres = IInternetProtocol_Read(protocol, buf, 2, &cb); - ok(hres == S_FALSE, "Read failed: %08x\n", hres); - hres = IInternetProtocol_LockRequest(protocol, 0); - ok(hres == S_OK, "LockRequest failed: %08x\n", hres); - hres = IInternetProtocol_UnlockRequest(protocol); - ok(hres == S_OK, "UnlockRequest failed: %08x\n", hres); + if(file_protocol_start(protocol, url, TRUE)) { + hres = IInternetProtocol_Read(protocol, buf, 2, &cb); + ok(hres == S_OK, "Read failed: %08x\n", hres); + ok(cb == 2, "cb=%u expected 2\n", cb); + hres = IInternetProtocol_Read(protocol, buf, sizeof(buf), &cb); + ok(hres == S_FALSE, "Read failed: %08x\n", hres); + hres = IInternetProtocol_Read(protocol, buf, sizeof(buf), &cb); + ok(hres == S_FALSE, "Read failed: %08x expected S_FALSE\n", hres); + ok(cb == 0, "cb=%u expected 0\n", cb); + hres = IInternetProtocol_UnlockRequest(protocol); + ok(hres == S_OK, "UnlockRequest failed: %08x\n", hres); + } + + if(file_protocol_start(protocol, url, FALSE)) { + hres = IInternetProtocol_Read(protocol, buf, 2, &cb); + ok(hres == S_FALSE, "Read failed: %08x\n", hres); + hres = IInternetProtocol_LockRequest(protocol, 0); + ok(hres == S_OK, "LockRequest failed: %08x\n", hres); + hres = IInternetProtocol_UnlockRequest(protocol); + ok(hres == S_OK, "UnlockRequest failed: %08x\n", hres); + } IInternetProtocol_Release(protocol); } @@ -1288,19 +1296,20 @@ static void test_file_protocol_url(LPCWSTR url) ok(hres == S_OK, "Could not get IInternetProtocol: %08x\n", hres); if(SUCCEEDED(hres)) { - file_protocol_start(protocol, url, TRUE); - hres = IInternetProtocol_LockRequest(protocol, 0); - ok(hres == S_OK, "LockRequest failed: %08x\n", hres); - hres = IInternetProtocol_Terminate(protocol, 0); - ok(hres == S_OK, "Terminate failed: %08x\n", hres); - hres = IInternetProtocol_Read(protocol, buf, 2, &cb); - ok(hres == S_OK, "Read failed: %08x\n\n", hres); - hres = IInternetProtocol_UnlockRequest(protocol); - ok(hres == S_OK, "UnlockRequest failed: %08x\n", hres); - hres = IInternetProtocol_Read(protocol, buf, 2, &cb); - ok(hres == S_OK, "Read failed: %08x\n", hres); - hres = IInternetProtocol_Terminate(protocol, 0); - ok(hres == S_OK, "Terminate failed: %08x\n", hres); + if(file_protocol_start(protocol, url, TRUE)) { + hres = IInternetProtocol_LockRequest(protocol, 0); + ok(hres == S_OK, "LockRequest failed: %08x\n", hres); + hres = IInternetProtocol_Terminate(protocol, 0); + ok(hres == S_OK, "Terminate failed: %08x\n", hres); + hres = IInternetProtocol_Read(protocol, buf, 2, &cb); + ok(hres == S_OK, "Read failed: %08x\n\n", hres); + hres = IInternetProtocol_UnlockRequest(protocol); + ok(hres == S_OK, "UnlockRequest failed: %08x\n", hres); + hres = IInternetProtocol_Read(protocol, buf, 2, &cb); + ok(hres == S_OK, "Read failed: %08x\n", hres); + hres = IInternetProtocol_Terminate(protocol, 0); + ok(hres == S_OK, "Terminate failed: %08x\n", hres); + } IInternetProtocol_Release(protocol); } @@ -1309,12 +1318,13 @@ static void test_file_protocol_url(LPCWSTR url) ok(hres == S_OK, "Could not get IInternetProtocol: %08x\n", hres); if(SUCCEEDED(hres)) { - file_protocol_start(protocol, url, TRUE); - hres = IInternetProtocol_Terminate(protocol, 0); - ok(hres == S_OK, "Terminate failed: %08x\n", hres); - hres = IInternetProtocol_Read(protocol, buf, 2, &cb); - ok(hres == S_OK, "Read failed: %08x\n", hres); - ok(cb == 2, "cb=%u expected 2\n", cb); + if(file_protocol_start(protocol, url, TRUE)) { + hres = IInternetProtocol_Terminate(protocol, 0); + ok(hres == S_OK, "Terminate failed: %08x\n", hres); + hres = IInternetProtocol_Read(protocol, buf, 2, &cb); + ok(hres == S_OK, "Read failed: %08x\n", hres); + ok(cb == 2, "cb=%u expected 2\n", cb); + } IInternetProtocol_Release(protocol); } @@ -1557,7 +1567,6 @@ static void test_http_protocol_url(LPCWSTR url, BOOL is_first) if(SUCCEEDED(hres)) { BYTE buf[3600]; DWORD cb; - int *called = (bindf & BINDF_FROMURLMON) ? &called_Switch : &called_ReportData; test_priority(http_protocol); @@ -1579,8 +1588,8 @@ static void test_http_protocol_url(LPCWSTR url, BOOL is_first) expect_hrResult = S_OK; hres = IInternetProtocol_Read(http_protocol, buf, 1, &cb); - ok((!*called && hres == E_PENDING && cb==0) || - (*called && hres == S_OK && cb==1), "Read failed: %08x (%d bytes)\n", hres, cb); + ok((hres == E_PENDING && cb==0) || + (hres == S_OK && cb==1), "Read failed: %08x (%d bytes)\n", hres, cb); WaitForSingleObject(event_complete, INFINITE); if(bindf & BINDF_FROMURLMON) @@ -1596,8 +1605,8 @@ static void test_http_protocol_url(LPCWSTR url, BOOL is_first) hres = IInternetProtocol_Read(http_protocol, buf, sizeof(buf), &cb); if(hres == E_PENDING) { hres = IInternetProtocol_Read(http_protocol, buf, 1, &cb); - ok((!*called && hres == E_PENDING && cb==0) || - (*called && hres == S_OK && cb==1), "Read failed: %08x (%d bytes)\n", hres, cb); + ok((hres == E_PENDING && cb==0) || + (hres == S_OK && cb==1), "Read failed: %08x (%d bytes)\n", hres, cb); WaitForSingleObject(event_complete, INFINITE); if(bindf & BINDF_FROMURLMON) CHECK_CALLED(Switch); diff --git a/dlls/user32/tests/input.c b/dlls/user32/tests/input.c index aac6d61ef57..8211cdb6c41 100644 --- a/dlls/user32/tests/input.c +++ b/dlls/user32/tests/input.c @@ -360,11 +360,24 @@ static void test_Input_whitebox(void) DestroyWindow(hWndTest); } -static void empty_message_queue(void) { +/* try to make sure pending X events have been processed before continuing */ +static void empty_message_queue(void) +{ MSG msg; - while(PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) { - TranslateMessage(&msg); - DispatchMessage(&msg); + int diff = 200; + int min_timeout = 50; + DWORD time = GetTickCount() + diff; + + while (diff > 0) + { + if (MsgWaitForMultipleObjects(0, NULL, FALSE, min_timeout, QS_ALLINPUT) == WAIT_TIMEOUT) break; + while (PeekMessage(&msg, 0, 0, 0, PM_REMOVE)) + { + TranslateMessage(&msg); + DispatchMessage(&msg); + } + diff = time - GetTickCount(); + min_timeout = 20; } } @@ -402,6 +415,7 @@ struct sendinput_test_s { struct message expected_messages[MAXKEYMESSAGES+1]; } sendinput_test[] = { /* test ALT+F */ + /* 0 */ {VK_LMENU, 0, 0, {{VK_MENU, 0x00}, {VK_LMENU, 0x00}, {0}}, {{WM_SYSKEYDOWN, hook|wparam, VK_LMENU}, {WM_SYSKEYDOWN}, {0}}}, {'F', 0, 0, {{'F', 0x00}, {0}}, @@ -414,6 +428,7 @@ struct sendinput_test_s { {{WM_KEYUP, hook}, {WM_KEYUP}, {0}}}, /* test CTRL+O */ + /* 4 */ {VK_LCONTROL, 0, 0, {{VK_CONTROL, 0x00}, {VK_LCONTROL, 0x00}, {0}}, {{WM_KEYDOWN, hook}, {WM_KEYDOWN}, {0}}}, {'O', 0, 0, {{'O', 0x00}, {0}}, @@ -424,6 +439,7 @@ struct sendinput_test_s { {{WM_KEYUP, hook}, {WM_KEYUP}, {0}}}, /* test ALT+CTRL+X */ + /* 8 */ {VK_LMENU, 0, 0, {{VK_MENU, 0x00}, {VK_LMENU, 0x00}, {0}}, {{WM_SYSKEYDOWN, hook}, {WM_SYSKEYDOWN}, {0}}}, {VK_LCONTROL, 0, 0, {{VK_CONTROL, 0x00}, {VK_LCONTROL, 0x00}, {0}}, @@ -438,6 +454,7 @@ struct sendinput_test_s { {{WM_KEYUP, hook}, {WM_KEYUP}, {0}}}, /* test SHIFT+A */ + /* 14 */ {VK_LSHIFT, 0, 0, {{VK_SHIFT, 0x00}, {VK_LSHIFT, 0x00}, {0}}, {{WM_KEYDOWN, hook}, {WM_KEYDOWN}, {0}}}, {'A', 0, 0, {{'A', 0x00}, {0}}, @@ -448,6 +465,7 @@ struct sendinput_test_s { {{WM_KEYUP, hook}, {WM_KEYUP}, {0}}}, /* test L-SHIFT & R-SHIFT: */ /* RSHIFT == LSHIFT */ + /* 18 */ {VK_RSHIFT, 0, 0, /* recent windows versions (>= w2k3) correctly report an RSHIFT transition */ {{VK_SHIFT, 0x00}, {VK_LSHIFT, 0x00, TRUE}, {VK_RSHIFT, 0x00, TRUE}, {0}}, @@ -459,6 +477,7 @@ struct sendinput_test_s { {WM_KEYUP}, {0}}}, /* LSHIFT | KEYEVENTF_EXTENDEDKEY == RSHIFT */ + /* 20 */ {VK_LSHIFT, KEYEVENTF_EXTENDEDKEY, 0, {{VK_SHIFT, 0x00}, {VK_RSHIFT, 0x00}, {0}}, {{WM_KEYDOWN, hook|wparam|lparam, VK_LSHIFT, LLKHF_EXTENDED}, @@ -468,6 +487,7 @@ struct sendinput_test_s { {{WM_KEYUP, hook|wparam|lparam, VK_LSHIFT, LLKHF_UP|LLKHF_EXTENDED}, {WM_KEYUP, wparam|lparam, VK_SHIFT, KF_UP}, {0}}}, /* RSHIFT | KEYEVENTF_EXTENDEDKEY == RSHIFT */ + /* 22 */ {VK_RSHIFT, KEYEVENTF_EXTENDEDKEY, 0, {{VK_SHIFT, 0x00}, {VK_RSHIFT, 0x00}, {0}}, {{WM_KEYDOWN, hook|wparam|lparam, VK_RSHIFT, LLKHF_EXTENDED}, @@ -482,6 +502,7 @@ struct sendinput_test_s { winXP+ - Attempts to convert key to L/R key but not always correct */ /* SHIFT == LSHIFT */ + /* 24 */ {VK_SHIFT, 0, 0, {{VK_SHIFT, 0x00}, {VK_LSHIFT, 0x00}, {0}}, {{WM_KEYDOWN, hook/* |wparam */|lparam, VK_SHIFT, 0}, @@ -491,6 +512,7 @@ struct sendinput_test_s { {{WM_KEYUP, hook/*|wparam*/|lparam, VK_SHIFT, LLKHF_UP}, {WM_KEYUP, wparam|lparam, VK_SHIFT, KF_UP}, {0}}}, /* SHIFT | KEYEVENTF_EXTENDEDKEY == RSHIFT */ + /* 26 */ {VK_SHIFT, KEYEVENTF_EXTENDEDKEY, 0, {{VK_SHIFT, 0x00}, {VK_RSHIFT, 0x00}, {0}}, {{WM_KEYDOWN, hook/*|wparam*/|lparam, VK_SHIFT, LLKHF_EXTENDED}, @@ -502,6 +524,7 @@ struct sendinput_test_s { /* test L-CONTROL & R-CONTROL: */ /* RCONTROL == LCONTROL */ + /* 28 */ {VK_RCONTROL, 0, 0, {{VK_CONTROL, 0x00}, {VK_LCONTROL, 0x00}, {0}}, {{WM_KEYDOWN, hook|wparam, VK_RCONTROL}, @@ -511,6 +534,7 @@ struct sendinput_test_s { {{WM_KEYUP, hook|wparam, VK_RCONTROL}, {WM_KEYUP, wparam|lparam, VK_CONTROL, KF_UP}, {0}}}, /* LCONTROL | KEYEVENTF_EXTENDEDKEY == RCONTROL */ + /* 30 */ {VK_LCONTROL, KEYEVENTF_EXTENDEDKEY, 0, {{VK_CONTROL, 0x00}, {VK_RCONTROL, 0x00}, {0}}, {{WM_KEYDOWN, hook|wparam|lparam, VK_LCONTROL, LLKHF_EXTENDED}, @@ -520,6 +544,7 @@ struct sendinput_test_s { {{WM_KEYUP, hook|wparam|lparam, VK_LCONTROL, LLKHF_UP|LLKHF_EXTENDED}, {WM_KEYUP, wparam|lparam, VK_CONTROL, KF_UP|KF_EXTENDED}, {0}}}, /* RCONTROL | KEYEVENTF_EXTENDEDKEY == RCONTROL */ + /* 32 */ {VK_RCONTROL, KEYEVENTF_EXTENDEDKEY, 0, {{VK_CONTROL, 0x00}, {VK_RCONTROL, 0x00}, {0}}, {{WM_KEYDOWN, hook|wparam|lparam, VK_RCONTROL, LLKHF_EXTENDED}, @@ -529,6 +554,7 @@ struct sendinput_test_s { {{WM_KEYUP, hook|wparam|lparam, VK_RCONTROL, LLKHF_UP|LLKHF_EXTENDED}, {WM_KEYUP, wparam|lparam, VK_CONTROL, KF_UP|KF_EXTENDED}, {0}}}, /* CONTROL == LCONTROL */ + /* 34 */ {VK_CONTROL, 0, 0, {{VK_CONTROL, 0x00}, {VK_LCONTROL, 0x00}, {0}}, {{WM_KEYDOWN, hook/*|wparam, VK_CONTROL*/}, @@ -538,6 +564,7 @@ struct sendinput_test_s { {{WM_KEYUP, hook/*|wparam, VK_CONTROL*/}, {WM_KEYUP, wparam|lparam, VK_CONTROL, KF_UP}, {0}}}, /* CONTROL | KEYEVENTF_EXTENDEDKEY == RCONTROL */ + /* 36 */ {VK_CONTROL, KEYEVENTF_EXTENDEDKEY, 0, {{VK_CONTROL, 0x00}, {VK_RCONTROL, 0x00}, {0}}, {{WM_KEYDOWN, hook/*|wparam*/|lparam, VK_CONTROL, LLKHF_EXTENDED}, @@ -549,6 +576,7 @@ struct sendinput_test_s { /* test L-MENU & R-MENU: */ /* RMENU == LMENU */ + /* 38 */ {VK_RMENU, 0, 0, {{VK_MENU, 0x00}, {VK_LMENU, 0x00}, {0}}, {{WM_SYSKEYDOWN, hook|wparam, VK_RMENU}, @@ -559,6 +587,7 @@ struct sendinput_test_s { {WM_SYSKEYUP, wparam|lparam, VK_MENU, KF_UP}, {WM_SYSCOMMAND}, {0}}}, /* LMENU | KEYEVENTF_EXTENDEDKEY == RMENU */ + /* 40 */ {VK_LMENU, KEYEVENTF_EXTENDEDKEY, 0, {{VK_MENU, 0x00}, {VK_RMENU, 0x00}, {0}}, {{WM_SYSKEYDOWN, hook|wparam|lparam, VK_LMENU, LLKHF_EXTENDED}, @@ -569,6 +598,7 @@ struct sendinput_test_s { {WM_SYSKEYUP, wparam|lparam, VK_MENU, KF_UP|KF_EXTENDED}, {WM_SYSCOMMAND}, {0}}}, /* RMENU | KEYEVENTF_EXTENDEDKEY == RMENU */ + /* 42 */ {VK_RMENU, KEYEVENTF_EXTENDEDKEY, 0, {{VK_MENU, 0x00}, {VK_RMENU, 0x00}, {0}}, {{WM_SYSKEYDOWN, hook|wparam|lparam, VK_RMENU, LLKHF_EXTENDED}, @@ -579,6 +609,7 @@ struct sendinput_test_s { {WM_SYSKEYUP, wparam|lparam, VK_MENU, KF_UP|KF_EXTENDED}, {WM_SYSCOMMAND}, {0}}}, /* MENU == LMENU */ + /* 44 */ {VK_MENU, 0, 0, {{VK_MENU, 0x00}, {VK_LMENU, 0x00}, {0}}, {{WM_SYSKEYDOWN, hook/*|wparam, VK_MENU*/}, @@ -589,6 +620,7 @@ struct sendinput_test_s { {WM_SYSKEYUP, wparam|lparam, VK_MENU, KF_UP}, {WM_SYSCOMMAND}, {0}}}, /* MENU | KEYEVENTF_EXTENDEDKEY == RMENU */ + /* 46 */ {VK_MENU, KEYEVENTF_EXTENDEDKEY, 0, {{VK_MENU, 0x00}, {VK_RMENU, 0x00}, {0}}, {{WM_SYSKEYDOWN, hook/*|wparam*/|lparam, VK_MENU, LLKHF_EXTENDED}, @@ -600,6 +632,7 @@ struct sendinput_test_s { {WM_SYSCOMMAND}, {0}}}, /* test LSHIFT & RSHIFT */ + /* 48 */ {VK_LSHIFT, 0, 0, {{VK_SHIFT, 0x00}, {VK_LSHIFT, 0x00}, {0}}, {{WM_KEYDOWN, hook|wparam|lparam, VK_LSHIFT, 0}, @@ -639,15 +672,15 @@ static void compare_and_check(int id, BYTE *ks1, BYTE *ks2, struct sendinput_tes { failcount++; todo_wine { - ok(matched, "%02d: %02x from %02x -> %02x " - "instead of %02x -> %02x\n", id, t->wVk, - ks1[t->wVk]&0x80, ks2[t->wVk]&0x80, t->before_state, + ok(matched, "%2d (%x/%x): %02x from %02x -> %02x " + "instead of %02x -> %02x\n", id, test->wVk, test->dwFlags, + t->wVk, ks1[t->wVk]&0x80, ks2[t->wVk]&0x80, t->before_state, ~t->before_state&0x80); } } else { - ok(matched || t->optional, "%02d: %02x from %02x -> %02x " - "instead of %02x -> %02x\n", id, t->wVk, - ks1[t->wVk]&0x80, ks2[t->wVk]&0x80, t->before_state, + ok(matched || t->optional, "%2d (%x/%x): %02x from %02x -> %02x " + "instead of %02x -> %02x\n", id, test->wVk, test->dwFlags, + t->wVk, ks1[t->wVk]&0x80, ks2[t->wVk]&0x80, t->before_state, ~t->before_state&0x80); } ks2[t->wVk] = ks1[t->wVk]; /* clear the match */ @@ -658,11 +691,12 @@ static void compare_and_check(int id, BYTE *ks1, BYTE *ks2, struct sendinput_tes { failcount++; todo_wine - ok(FALSE, "%02d: %02x from %02x -> %02x unexpected\n", id, i, ks1[i], ks2[i]); + ok(FALSE, "%2d (%x/%x): %02x from %02x -> %02x unexpected\n", + id, test->wVk, test->dwFlags, i, ks1[i], ks2[i]); } else - ok(ks2[i] == ks1[i], "%02d: %02x from %02x -> %02x unexpected\n", - id, i, ks1[i], ks2[i]); + ok(ks2[i] == ks1[i], "%2d (%x/%x): %02x from %02x -> %02x unexpected\n", + id, test->wVk, test->dwFlags, i, ks1[i], ks2[i]); while (expected->message && actual_cnt < sent_messages_cnt) { @@ -671,8 +705,8 @@ static void compare_and_check(int id, BYTE *ks1, BYTE *ks2, struct sendinput_tes if (expected->message == actual->message) { ok((expected->flags & hook) == (actual->flags & hook), - "%x/%x: the msg 0x%04x should have been sent by a hook\n", - test->wVk, test->dwFlags, expected->message); + "%2d (%x/%x): the msg 0x%04x should have been sent by a hook\n", + id, test->wVk, test->dwFlags, expected->message); if (expected->flags & wparam) { @@ -680,13 +714,13 @@ static void compare_and_check(int id, BYTE *ks1, BYTE *ks2, struct sendinput_tes { failcount++; todo_wine - ok(FALSE, "%x/%x: in msg 0x%04x expecting wParam 0x%lx got 0x%lx\n", - test->wVk, test->dwFlags, expected->message, expected->wParam, actual->wParam); + ok(FALSE, "%2d (%x/%x): in msg 0x%04x expecting wParam 0x%lx got 0x%lx\n", + id, test->wVk, test->dwFlags, expected->message, expected->wParam, actual->wParam); } else ok(expected->wParam == actual->wParam, - "%x/%x: in msg 0x%04x expecting wParam 0x%lx got 0x%lx\n", - test->wVk, test->dwFlags, expected->message, expected->wParam, actual->wParam); + "%2d (%x/%x): in msg 0x%04x expecting wParam 0x%lx got 0x%lx\n", + id, test->wVk, test->dwFlags, expected->message, expected->wParam, actual->wParam); } if (expected->flags & lparam) { @@ -694,13 +728,13 @@ static void compare_and_check(int id, BYTE *ks1, BYTE *ks2, struct sendinput_tes { failcount++; todo_wine - ok(FALSE, "%x/%x: in msg 0x%04x expecting lParam 0x%lx got 0x%lx\n", - test->wVk, test->dwFlags, expected->message, expected->lParam, actual->lParam); + ok(FALSE, "%2d (%x/%x): in msg 0x%04x expecting lParam 0x%lx got 0x%lx\n", + id, test->wVk, test->dwFlags, expected->message, expected->lParam, actual->lParam); } else ok(expected->lParam == actual->lParam, - "%x/%x: in msg 0x%04x expecting lParam 0x%lx got 0x%lx\n", - test->wVk, test->dwFlags, expected->message, expected->lParam, actual->lParam); + "%2d (%x/%x): in msg 0x%04x expecting lParam 0x%lx got 0x%lx\n", + id, test->wVk, test->dwFlags, expected->message, expected->lParam, actual->lParam); } } else if (expected->flags & optional) @@ -713,13 +747,13 @@ static void compare_and_check(int id, BYTE *ks1, BYTE *ks2, struct sendinput_tes failcount++; todo_wine ok(FALSE, - "%x/%x: the msg 0x%04x was expected, but got msg 0x%04x instead\n", - test->wVk, test->dwFlags, expected->message, actual->message); + "%2d (%x/%x): the msg 0x%04x was expected, but got msg 0x%04x instead\n", + id, test->wVk, test->dwFlags, expected->message, actual->message); } else ok(FALSE, - "%x/%x: the msg 0x%04x was expected, but got msg 0x%04x instead\n", - test->wVk, test->dwFlags, expected->message, actual->message); + "%2d (%x/%x): the msg 0x%04x was expected, but got msg 0x%04x instead\n", + id, test->wVk, test->dwFlags, expected->message, actual->message); actual_cnt++; expected++; @@ -735,17 +769,17 @@ static void compare_and_check(int id, BYTE *ks1, BYTE *ks2, struct sendinput_tes { failcount++; todo_wine - ok(FALSE, "%x/%x: the msg sequence is not complete: expected %04x - actual %04x\n", - test->wVk, test->dwFlags, expected->message, sent_messages[actual_cnt].message); + ok(FALSE, "%2d (%x/%x): the msg sequence is not complete: expected %04x - actual %04x\n", + id, test->wVk, test->dwFlags, expected->message, sent_messages[actual_cnt].message); } else - ok(FALSE, "%x/%x: the msg sequence is not complete: expected %04x - actual %04x\n", - test->wVk, test->dwFlags, expected->message, sent_messages[actual_cnt].message); + ok(FALSE, "%2d (%x/%x): the msg sequence is not complete: expected %04x - actual %04x\n", + id, test->wVk, test->dwFlags, expected->message, sent_messages[actual_cnt].message); } if( test->_todo_wine && !failcount) /* succeeded yet marked todo */ todo_wine - ok(TRUE, "%x/%x: marked \"todo_wine\" but succeeds\n", test->wVk, test->dwFlags); + ok(TRUE, "%2d (%x/%x): marked \"todo_wine\" but succeeds\n", id, test->wVk, test->dwFlags); sent_messages_cnt = 0; } diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c index 3954b07fe7c..fac40fefc6e 100644 --- a/dlls/user32/tests/win.c +++ b/dlls/user32/tests/win.c @@ -4935,7 +4935,6 @@ START_TEST(win) test_CreateWindow(); test_parent_owner(); test_SetParent(); - test_shell_window(); test_mdi(); test_icons(); @@ -4968,6 +4967,8 @@ START_TEST(win) test_Expose(); test_layered_window(); + test_shell_window(); + /* add the tests above this line */ UnhookWindowsHookEx(hhook); } diff --git a/dlls/uxtheme/draw.c b/dlls/uxtheme/draw.c index 8b3b95956c5..ff0ac9e2a00 100644 --- a/dlls/uxtheme/draw.c +++ b/dlls/uxtheme/draw.c @@ -52,19 +52,18 @@ extern ATOM atDialogThemeEnabled; HRESULT WINAPI EnableThemeDialogTexture(HWND hwnd, DWORD dwFlags) { static const WCHAR szTab[] = { 'T','a','b',0 }; - HRESULT hr; + BOOL res; TRACE("(%p,0x%08x\n", hwnd, dwFlags); - hr = SetPropW (hwnd, (LPCWSTR)MAKEINTATOM(atDialogThemeEnabled), + res = SetPropW (hwnd, (LPCWSTR)MAKEINTATOM(atDialogThemeEnabled), (HANDLE)(dwFlags|0x80000000)); /* 0x80000000 serves as a "flags set" flag */ - if (FAILED(hr)) - return hr; + if (!res) + return HRESULT_FROM_WIN32(GetLastError()); if (dwFlags & ETDT_USETABTEXTURE) return SetWindowTheme (hwnd, NULL, szTab); else return SetWindowTheme (hwnd, NULL, NULL); - return S_OK; } /*********************************************************************** diff --git a/dlls/wineps.drv/wps_Ja.rc b/dlls/wineps.drv/wps_Ja.rc index 180422daf85..e7759ff928c 100644 --- a/dlls/wineps.drv/wps_Ja.rc +++ b/dlls/wineps.drv/wps_Ja.rc @@ -21,7 +21,7 @@ LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT PAPER DIALOG LOADONCALL MOVEABLE DISCARDABLE 5, 43, 227, 215 STYLE WS_POPUP | WS_CAPTION | WS_CLIPSIBLINGS | WS_VISIBLE CAPTION "—pŽ†" -FONT 9, "MS UI Gothic" +FONT 9, "MS Shell Dlg" { LTEXT "—pŽ†ƒTƒCƒY(&z):", -1, 10, 6, 100, 8 LISTBOX IDD_PAPERS, 10, 15, 200, 45, LBS_STANDARD | LBS_HASSTRINGS | diff --git a/dlls/winhttp/tests/notification.c b/dlls/winhttp/tests/notification.c index 64adaeac188..de8508adc90 100644 --- a/dlls/winhttp/tests/notification.c +++ b/dlls/winhttp/tests/notification.c @@ -45,6 +45,7 @@ struct notification enum api function; /* api responsible for notification */ unsigned int status; /* status received */ int todo; + int ignore; }; struct info @@ -73,12 +74,12 @@ static void CALLBACK check_notification( HINTERNET handle, DWORD_PTR context, DW status_ok = (info->test[i].status == status); function_ok = (info->test[i].function == info->function); - if (!info->test[i].todo) + if (!info->test[i].ignore && !info->test[i].todo) { ok(status_ok, "%u: expected status 0x%08x got 0x%08x\n", info->line, info->test[i].status, status); ok(function_ok, "%u: expected function %u got %u\n", info->line, info->test[i].function, info->function); } - else + else if (!info->test[i].ignore) { todo_wine ok(status_ok, "%u: expected status 0x%08x got 0x%08x\n", info->line, info->test[i].status, status); if (status_ok) @@ -305,9 +306,9 @@ static const struct notification async_test[] = { winhttp_receive_response, WINHTTP_CALLBACK_STATUS_RESPONSE_RECEIVED, 0 }, { winhttp_receive_response, WINHTTP_CALLBACK_STATUS_HEADERS_AVAILABLE, 0 }, { winhttp_query_data, WINHTTP_CALLBACK_STATUS_DATA_AVAILABLE, 0 }, - { winhttp_read_data, WINHTTP_CALLBACK_STATUS_RECEIVING_RESPONSE, 1 }, - { winhttp_read_data, WINHTTP_CALLBACK_STATUS_RESPONSE_RECEIVED, 1 }, - { winhttp_read_data, WINHTTP_CALLBACK_STATUS_READ_COMPLETE, 1 }, + { winhttp_read_data, WINHTTP_CALLBACK_STATUS_RECEIVING_RESPONSE, 0, 1 }, + { winhttp_read_data, WINHTTP_CALLBACK_STATUS_RESPONSE_RECEIVED, 0, 1 }, + { winhttp_read_data, WINHTTP_CALLBACK_STATUS_READ_COMPLETE, 0, 1 }, { winhttp_close_handle, WINHTTP_CALLBACK_STATUS_CLOSING_CONNECTION, 0 }, { winhttp_close_handle, WINHTTP_CALLBACK_STATUS_CONNECTION_CLOSED, 0 }, { winhttp_close_handle, WINHTTP_CALLBACK_STATUS_HANDLE_CLOSING, 0 }, diff --git a/dlls/wininet/wininet_Ja.rc b/dlls/wininet/wininet_Ja.rc index 766c042ad00..4d130b1fa22 100644 --- a/dlls/wininet/wininet_Ja.rc +++ b/dlls/wininet/wininet_Ja.rc @@ -21,7 +21,7 @@ LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT IDD_PROXYDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 154 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "ƒlƒbƒgƒ��[ƒN ƒpƒXƒ��[ƒh‚Ì“ü—Í" -FONT 9, "MS UI Gothic" +FONT 9, "MS Shell Dlg" { LTEXT "ƒ†�[ƒU–¼‚ƃpƒXƒ��[ƒh‚ð“ü—Í‚µ‚ĉº‚³‚¢:", -1, 40, 6, 150, 15 LTEXT "ƒvƒ�ƒLƒV", -1, 40, 26, 50, 10 diff --git a/dlls/winspool.drv/info.c b/dlls/winspool.drv/info.c index 4737e986393..3ac336d7667 100644 --- a/dlls/winspool.drv/info.c +++ b/dlls/winspool.drv/info.c @@ -7574,6 +7574,7 @@ static BOOL schedule_lpr(LPCWSTR printer_name, LPCWSTR filename) char *unixname, *queue, *cmd; char fmt[] = "lpr -P%s %s"; DWORD len; + int r; if(!(unixname = wine_get_unix_file_name(filename))) return FALSE; @@ -7586,12 +7587,12 @@ static BOOL schedule_lpr(LPCWSTR printer_name, LPCWSTR filename) sprintf(cmd, fmt, queue, unixname); TRACE("printing with: %s\n", cmd); - system(cmd); + r = system(cmd); HeapFree(GetProcessHeap(), 0, cmd); HeapFree(GetProcessHeap(), 0, queue); HeapFree(GetProcessHeap(), 0, unixname); - return TRUE; + return (r == 0); } /***************************************************************************** @@ -7714,10 +7715,11 @@ static BOOL schedule_file(LPCWSTR filename) if(get_filename(&output)) { + BOOL r; TRACE("copy to %s\n", debugstr_w(output)); - CopyFileW(filename, output, FALSE); + r = CopyFileW(filename, output, FALSE); HeapFree(GetProcessHeap(), 0, output); - return TRUE; + return r; } return FALSE; } @@ -7869,23 +7871,23 @@ BOOL WINAPI ScheduleJob( HANDLE hPrinter, DWORD dwJobID ) } if(output[0] == '|') { - schedule_pipe(output + 1, job->filename); + ret = schedule_pipe(output + 1, job->filename); } else if(output[0]) { - schedule_unixfile(output, job->filename); + ret = schedule_unixfile(output, job->filename); } else if(!strncmpW(pi5->pPortName, LPR_Port, strlenW(LPR_Port))) { - schedule_lpr(pi5->pPortName + strlenW(LPR_Port), job->filename); + ret = schedule_lpr(pi5->pPortName + strlenW(LPR_Port), job->filename); } else if(!strncmpW(pi5->pPortName, CUPS_Port, strlenW(CUPS_Port))) { - schedule_cups(pi5->pPortName + strlenW(CUPS_Port), job->filename, job->document_title); + ret = schedule_cups(pi5->pPortName + strlenW(CUPS_Port), job->filename, job->document_title); } else if(!strncmpW(pi5->pPortName, FILE_Port, strlenW(FILE_Port))) { - schedule_file(job->filename); + ret = schedule_file(job->filename); } else { @@ -7899,7 +7901,6 @@ BOOL WINAPI ScheduleJob( HANDLE hPrinter, DWORD dwJobID ) HeapFree(GetProcessHeap(), 0, job->document_title); HeapFree(GetProcessHeap(), 0, job->filename); HeapFree(GetProcessHeap(), 0, job); - ret = TRUE; break; } end: diff --git a/dlls/wintrust/softpub.c b/dlls/wintrust/softpub.c index 52df73d3a70..9140182ee54 100644 --- a/dlls/wintrust/softpub.c +++ b/dlls/wintrust/softpub.c @@ -501,6 +501,20 @@ HRESULT WINAPI SoftpubLoadSignature(CRYPT_PROVIDER_DATA *data) return ret ? S_OK : S_FALSE; } +static DWORD WINTRUST_TrustStatusToConfidence(DWORD errorStatus) +{ + DWORD confidence = 0; + + confidence = 0; + if (!(errorStatus & CERT_TRUST_IS_NOT_SIGNATURE_VALID)) + confidence |= CERT_CONFIDENCE_SIG; + if (!(errorStatus & CERT_TRUST_IS_NOT_TIME_VALID)) + confidence |= CERT_CONFIDENCE_TIME; + if (!(errorStatus & CERT_TRUST_IS_NOT_TIME_NESTED)) + confidence |= CERT_CONFIDENCE_TIMENEST; + return confidence; +} + BOOL WINAPI SoftpubCheckCert(CRYPT_PROVIDER_DATA *data, DWORD idxSigner, BOOL fCounterSignerChain, DWORD idxCounterSigner) { @@ -524,19 +538,9 @@ BOOL WINAPI SoftpubCheckCert(CRYPT_PROVIDER_DATA *data, DWORD idxSigner, for (i = 0; i < simpleChain->cElement; i++) { /* Set confidence */ - data->pasSigners[idxSigner].pasCertChain[i].dwConfidence = 0; - if (!(simpleChain->rgpElement[i]->TrustStatus.dwErrorStatus & - CERT_TRUST_IS_NOT_TIME_VALID)) - data->pasSigners[idxSigner].pasCertChain[i].dwConfidence - |= CERT_CONFIDENCE_TIME; - if (!(simpleChain->rgpElement[i]->TrustStatus.dwErrorStatus & - CERT_TRUST_IS_NOT_TIME_NESTED)) - data->pasSigners[idxSigner].pasCertChain[i].dwConfidence - |= CERT_CONFIDENCE_TIMENEST; - if (!(simpleChain->rgpElement[i]->TrustStatus.dwErrorStatus & - CERT_TRUST_IS_NOT_SIGNATURE_VALID)) - data->pasSigners[idxSigner].pasCertChain[i].dwConfidence - |= CERT_CONFIDENCE_SIG; + data->pasSigners[idxSigner].pasCertChain[i].dwConfidence = + WINTRUST_TrustStatusToConfidence( + simpleChain->rgpElement[i]->TrustStatus.dwErrorStatus); /* Set additional flags */ if (!(simpleChain->rgpElement[i]->TrustStatus.dwErrorStatus & CERT_TRUST_IS_UNTRUSTED_ROOT)) @@ -552,18 +556,49 @@ BOOL WINAPI SoftpubCheckCert(CRYPT_PROVIDER_DATA *data, DWORD idxSigner, return ret; } -static DWORD WINTRUST_TrustStatusToConfidence(DWORD errorStatus) +static DWORD WINTRUST_TrustStatusToError(DWORD errorStatus) { - DWORD confidence = 0; - - confidence = 0; - if (!(errorStatus & CERT_TRUST_IS_NOT_SIGNATURE_VALID)) - confidence |= CERT_CONFIDENCE_SIG; - if (!(errorStatus & CERT_TRUST_IS_NOT_TIME_VALID)) - confidence |= CERT_CONFIDENCE_TIME; - if (!(errorStatus & CERT_TRUST_IS_NOT_TIME_NESTED)) - confidence |= CERT_CONFIDENCE_TIMENEST; - return confidence; + DWORD error; + + if (errorStatus & CERT_TRUST_IS_NOT_SIGNATURE_VALID) + error = TRUST_E_CERT_SIGNATURE; + else if (errorStatus & CERT_TRUST_IS_UNTRUSTED_ROOT) + error = CERT_E_UNTRUSTEDROOT; + else if (errorStatus & CERT_TRUST_IS_NOT_TIME_VALID) + error = CERT_E_EXPIRED; + else if (errorStatus & CERT_TRUST_IS_NOT_TIME_NESTED) + error = CERT_E_VALIDITYPERIODNESTING; + else if (errorStatus & CERT_TRUST_IS_REVOKED) + error = CERT_E_REVOKED; + else if (errorStatus & CERT_TRUST_IS_OFFLINE_REVOCATION || + errorStatus & CERT_TRUST_REVOCATION_STATUS_UNKNOWN) + error = CERT_E_REVOCATION_FAILURE; + else if (errorStatus & CERT_TRUST_IS_NOT_VALID_FOR_USAGE) + error = CERT_E_WRONG_USAGE; + else if (errorStatus & CERT_TRUST_IS_CYCLIC) + error = CERT_E_CHAINING; + else if (errorStatus & CERT_TRUST_INVALID_EXTENSION) + error = CERT_E_CRITICAL; + else if (errorStatus & CERT_TRUST_INVALID_POLICY_CONSTRAINTS) + error = CERT_E_INVALID_POLICY; + else if (errorStatus & CERT_TRUST_INVALID_BASIC_CONSTRAINTS) + error = TRUST_E_BASIC_CONSTRAINTS; + else if (errorStatus & CERT_TRUST_INVALID_NAME_CONSTRAINTS || + errorStatus & CERT_TRUST_HAS_NOT_SUPPORTED_NAME_CONSTRAINT || + errorStatus & CERT_TRUST_HAS_NOT_DEFINED_NAME_CONSTRAINT || + errorStatus & CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT || + errorStatus & CERT_TRUST_HAS_EXCLUDED_NAME_CONSTRAINT) + error = CERT_E_INVALID_NAME; + else if (errorStatus & CERT_TRUST_NO_ISSUANCE_CHAIN_POLICY) + error = CERT_E_INVALID_POLICY; + else if (errorStatus) + { + FIXME("unknown error status %08x\n", errorStatus); + error = TRUST_E_SYSTEM_ERROR; + } + else + error = S_OK; + return error; } static BOOL WINTRUST_CopyChain(CRYPT_PROVIDER_DATA *data, DWORD signerIdx) @@ -576,8 +611,6 @@ static BOOL WINTRUST_CopyChain(CRYPT_PROVIDER_DATA *data, DWORD signerIdx) data->pasSigners[signerIdx].pasCertChain[0].dwConfidence = WINTRUST_TrustStatusToConfidence( simpleChain->rgpElement[0]->TrustStatus.dwErrorStatus); - data->pasSigners[signerIdx].pasCertChain[0].dwError = - simpleChain->rgpElement[0]->TrustStatus.dwErrorStatus; data->pasSigners[signerIdx].pasCertChain[0].pChainElement = simpleChain->rgpElement[0]; ret = TRUE; @@ -592,10 +625,12 @@ static BOOL WINTRUST_CopyChain(CRYPT_PROVIDER_DATA *data, DWORD signerIdx) data->pasSigners[signerIdx].pasCertChain[i].dwConfidence = WINTRUST_TrustStatusToConfidence( simpleChain->rgpElement[i]->TrustStatus.dwErrorStatus); - data->pasSigners[signerIdx].pasCertChain[i].dwError = - simpleChain->rgpElement[i]->TrustStatus.dwErrorStatus; } } + data->pasSigners[signerIdx].pasCertChain[simpleChain->cElement - 1].dwError + = WINTRUST_TrustStatusToError( + simpleChain->rgpElement[simpleChain->cElement - 1]-> + TrustStatus.dwErrorStatus); return ret; } diff --git a/include/cryptuiapi.h b/include/cryptuiapi.h index f2efe8fdf61..2670b786773 100644 --- a/include/cryptuiapi.h +++ b/include/cryptuiapi.h @@ -88,6 +88,7 @@ typedef struct tagCRYPTUI_INITDIALOG_STRUCT #define CRYPTUI_ENABLE_REVOCATION_CHECK_CHAIN 0x00008000 #define CRYPTUI_ENABLE_REVOCATION_CHECK_CHAIN_EXCLUDE_ROOT CRYPTUI_ENABLE_REVOCATION_CHECKING #define CRYPTUI_DISABLE_HTMLLINK 0x00010000 +#define CRYPTUI_DISABLE_ISSUERSTATEMENT 0x00020000 typedef struct tagCRYPTUI_VIEWCERTIFICATE_STRUCTA { diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h index efef67ce8af..8df65f4a5f9 100644 --- a/include/gdiplusflat.h +++ b/include/gdiplusflat.h @@ -533,9 +533,12 @@ GpStatus WINGDIPAPI GdipTranslateRegionI(GpRegion *, INT, INT); GpStatus WINGDIPAPI GdipFlush(GpGraphics*, GpFlushIntention); GpStatus WINGDIPAPI GdipSetMetafileDownLevelRasterizationLimit(GpMetafile*,UINT); +GpStatus WINGDIPAPI GdipSetClipPath(GpGraphics*,GpPath*,CombineMode); GpStatus WINGDIPAPI GdipSetClipRect(GpGraphics*,REAL,REAL,REAL,REAL,CombineMode); GpStatus WINGDIPAPI GdipSetClipRectI(GpGraphics*,INT,INT,INT,INT,CombineMode); GpStatus WINGDIPAPI GdipFillRegion(GpGraphics*,GpBrush*,GpRegion*); +GpStatus WINGDIPAPI GdipIsVisiblePoint(GpGraphics*,REAL,REAL,BOOL*); +GpStatus WINGDIPAPI GdipIsVisiblePointI(GpGraphics*,INT,INT,BOOL*); GpStatus WINGDIPAPI GdipCreateAdjustableArrowCap(REAL,REAL,BOOL,GpAdjustableArrowCap**); GpStatus WINGDIPAPI GdipGetAdjustableArrowCapFillState(GpAdjustableArrowCap*,BOOL*); diff --git a/include/wincrypt.h b/include/wincrypt.h index 4b28f93df09..fa40266b3c3 100644 --- a/include/wincrypt.h +++ b/include/wincrypt.h @@ -4037,7 +4037,7 @@ BOOL WINAPI CertComparePublicKeyInfo(DWORD dwCertEncodingType, DWORD WINAPI CertGetPublicKeyLength(DWORD dwCertEncodingType, PCERT_PUBLIC_KEY_INFO pPublicKey); -const void *CertCreateContext(DWORD dwContextType, DWORD dwEncodingType, +const void * WINAPI CertCreateContext(DWORD dwContextType, DWORD dwEncodingType, const BYTE *pbEncoded, DWORD cbEncoded, DWORD dwFlags, PCERT_CREATE_CONTEXT_PARA pCreatePara); diff --git a/programs/reg/rsrc.rc b/programs/reg/Ja.rc similarity index 61% copy from programs/reg/rsrc.rc copy to programs/reg/Ja.rc index 03c4e635d1a..62a73a0dbbe 100644 --- a/programs/reg/rsrc.rc +++ b/programs/reg/Ja.rc @@ -1,4 +1,7 @@ /* + * REG.EXE - Wine-compatible reg program. + * Japanese language support + * * Copyright 2008 Andrew Riedi * * This library is free software; you can redistribute it and/or @@ -16,19 +19,12 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include - -#include "reg.h" - -LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL +LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT -#include "Da.rc" -#include "De.rc" -#include "En.rc" -#include "Fr.rc" -#include "Ko.rc" -#include "Nl.rc" -#include "No.rc" -#include "Pl.rc" -#include "Ru.rc" -#include "Si.rc" +STRINGTABLE +{ + STRING_USAGE, "‚±‚̃Rƒ}ƒ“ƒh‚Ì�\\•¶‚ÍŽŸ‚Ì‚Æ‚¨‚è‚Å‚·:\n\nREG [ ADD | DELETE | QUERY ]\nREG ƒRƒ}ƒ“ƒh /?\n" + STRING_ADD_USAGE, "REG ADD ƒL�[–¼ [/v ’l–¼ | /ve] [/t type] [/s ƒZƒpƒŒ�[ƒ^] [/d ƒf�[ƒ^] [/f]\n" + STRING_DELETE_USAGE, "REG DELETE ƒL�[–¼ [/v ’l–¼ | /ve | /va] [/f]\n" + STRING_QUERY_USAGE, "REG QUERY ƒL�[–¼ [/v ’l–¼ | /ve] [/s]\n" +} diff --git a/programs/reg/rsrc.rc b/programs/reg/rsrc.rc index 03c4e635d1a..0c69c1b3c06 100644 --- a/programs/reg/rsrc.rc +++ b/programs/reg/rsrc.rc @@ -26,6 +26,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL #include "De.rc" #include "En.rc" #include "Fr.rc" +#include "Ja.rc" #include "Ko.rc" #include "Nl.rc" #include "No.rc" diff --git a/programs/reg/rsrc.rc b/programs/write/Ja.rc similarity index 72% copy from programs/reg/rsrc.rc copy to programs/write/Ja.rc index 03c4e635d1a..458b9b1e742 100644 --- a/programs/reg/rsrc.rc +++ b/programs/write/Ja.rc @@ -1,5 +1,7 @@ /* - * Copyright 2008 Andrew Riedi + * Japanese language support + * + * Copyright (C) 2007 Mikolaj Zalewski * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,19 +18,9 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include - -#include "reg.h" - -LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL +LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT -#include "Da.rc" -#include "De.rc" -#include "En.rc" -#include "Fr.rc" -#include "Ko.rc" -#include "Nl.rc" -#include "No.rc" -#include "Pl.rc" -#include "Ru.rc" -#include "Si.rc" +STRINGTABLE +{ + IDS_FAILED, "Wordpad ‚Ì‹N“®‚ÉŽ¸”s‚µ‚Ü‚µ‚½" +} diff --git a/programs/write/rsrc.rc b/programs/write/rsrc.rc index 75b37f01d18..fa825840fdd 100644 --- a/programs/write/rsrc.rc +++ b/programs/write/rsrc.rc @@ -25,6 +25,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL #include "De.rc" #include "En.rc" #include "Fr.rc" +#include "Ja.rc" #include "Ko.rc" #include "Nl.rc" #include "No.rc" diff --git a/tools/winapi/msvcmaker b/tools/winapi/msvcmaker index 01b6d4b2f96..1fec041c9ca 100755 --- a/tools/winapi/msvcmaker +++ b/tools/winapi/msvcmaker @@ -120,6 +120,7 @@ MAKEFILE_IN: foreach my $makefile_in_file (@makefile_in_files) { my $module; my $testdll; my @imports; + my $type; my %vars; @@ -158,18 +159,22 @@ MAKEFILE_IN: foreach my $makefile_in_file (@makefile_in_files) { if($module eq "none") { if($makefile_in_file eq "tools/winebuild/Makefile.in") { $module = "winebuild.exe"; + } elsif ($makefile_in_file eq "include/Makefile.in") { + $module = "include.lib"; } else { next MAKEFILE_IN; } } - } elsif(/^LIBRARY\s*=\s*(\S+)\s*$/) { - $module = $1 . "\.lib"; + } elsif (/^\@MAKE_IMPLIB_RULES\@/) { + $type = "lib"; } elsif(/^TOPOBJDIR\s*=\s*(\S+)\s*$/) { $topobjdir = $1; } elsif (/^TESTDLL\s*=\s*(\S+)\s*$/) { $testdll = $1; } elsif (/^IMPORTS\s*=\s*/) { push @imports, grep !/^ntdll$/, split /\s+/s, $'; + } elsif (/^DELAYIMPORTS\s*=\s*/) { + push @imports, $; } elsif (/^EXTRALIBS\s*=\s*/) { push @imports, map { /^-l(dxerr8|dxerr9|dxguid|strmiids|uuid)$/ ? $1 : () } split /\s+/s, $'; } elsif (/^CTESTS\s*=\s*/) { @@ -213,6 +218,10 @@ MAKEFILE_IN: foreach my $makefile_in_file (@makefile_in_files) { close(IN); + if (!$module && $makefile_in_file eq "libs/wine/Makefile.in") { + $module = "wine.lib"; + } + next if !$module; my $c_srcs = []; @@ -232,16 +241,20 @@ MAKEFILE_IN: foreach my $makefile_in_file (@makefile_in_files) { $resource_files = [sort(@{$vars{RC_SRCS}})]; } + my $idl_h_files = []; + if(exists($vars{IDL_H_SRCS})) { + $idl_h_files = [sort(@{$vars{IDL_H_SRCS}})]; + } + my $project = $module; $project =~ s/\.(?:dll|exe|lib)$//; $project =~ y/./_/; - my $type; if($module =~ /\.exe$/) { $type = "exe"; } elsif($module =~ /\.lib$/) { $type = "lib"; - } else { + } elsif(!$type) { $type = "dll"; } @@ -265,6 +278,7 @@ MAKEFILE_IN: foreach my $makefile_in_file (@makefile_in_files) { ($source_files, my $local_source_files) = filter_files($source_files, "$dir2/"); ($header_files, my $local_header_files) = filter_files($header_files, "$dir2/"); ($resource_files, my $local_resource_files) = filter_files($resource_files, "$dir2/"); + ($idl_h_files, my $local_idl_h_files) = filter_files($idl_h_files, "$dir2/"); $modules{$module}{wine} = 1; $modules{$module}{winetest} = 0; @@ -276,6 +290,7 @@ MAKEFILE_IN: foreach my $makefile_in_file (@makefile_in_files) { $modules{$module}{header_files} = $local_header_files; $modules{$module}{resource_files} = $local_resource_files; $modules{$module}{imports} = []; + $modules{$module}{idl_h_files} = $local_idl_h_files; } } @@ -288,7 +303,8 @@ MAKEFILE_IN: foreach my $makefile_in_file (@makefile_in_files) { $modules{$module}{source_files} = $source_files; $modules{$module}{header_files} = $header_files; $modules{$module}{resource_files} = $resource_files; - $modules{$module}{imports} = []; + $modules{$module}{imports} = [@imports]; + $modules{$module}{idl_h_files} = $idl_h_files; } $wine_test_dsp_files{"wineruntests.dsp"}{files} = ["runtests.c"]; @@ -316,6 +332,7 @@ foreach my $dsp_file (keys(%wine_test_dsp_files)) { my $source_files = []; my $header_files = []; my $resource_files = []; + my $idl_h_files = []; my @tests = (); @@ -362,6 +379,7 @@ foreach my $dsp_file (keys(%wine_test_dsp_files)) { $modules{$module}{header_files} = $header_files; $modules{$module}{resource_files} = $resource_files; $modules{$module}{imports} = [@imports]; + $modules{$module}{idl_h_files} = []; $modules{$module}{tests} = [@tests]; } @@ -420,16 +438,21 @@ sub _generate_dsp($$) { $progress_current++; $output->progress("$dsp_file (file $progress_current of $progress_max)"); + my $base_module = $module; + $base_module =~ s/\.(?:dll)$//; + my @c_srcs = @{$modules{$module}{c_srcs}}; my @source_files = @{$modules{$module}{source_files}}; my @header_files = @{$modules{$module}{header_files}}; my @resource_files = @{$modules{$module}{resource_files}}; + my @idl_h_files = @{$modules{$module}{idl_h_files}}; if ($project !~ /^wine(?:build|runtests|test)?$/ && $project !~ /^(?:gdi32)_.+?$/ && - $project !~ /_test$/) + $project !~ /_test$/ && + !$lib) { - push @source_files, "$project.spec"; + push @source_files, "$base_module.spec"; @source_files = sort(@source_files); } @@ -571,23 +594,24 @@ sub _generate_dsp($$) { print OUT "# PROP Ignore_Export_Lib 0\r\n" if $dll; print OUT "# PROP Target_Dir \"\"\r\n"; - my @defines; + print OUT "# ADD BASE CPP /nologo "; + my @defines = qw(WINVER=0x0600 _WIN32_WINNT=0x0600 _WIN32_IE=0x0700 WIN32); if($debug) { if($lib || $exe) { - print OUT "# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od"; - @defines = (qw(WINVER=0x0600 _WIN32_WINNT=0x0600 _WIN32_IE=0x0700 WIN32 _DEBUG _MBCS _LIB)); + push @defines, qw(_DEBUG _MBCS _LIB); } else { - print OUT "# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od"; - @defines = (qw(WINVER=0x0600 _WIN32_WINNT=0x0600 _WIN32_IE=0x0700 WIN32 _DEBUG _WINDOWS _MBCS _USRDLL), ("\U${project}\E_EXPORTS")); + print OUT "/MDd "; + push @defines, (qw(_DEBUG _WINDOWS _MBCS _USRDLL), ("\U${project}\E_EXPORTS")); } + print OUT "/W3 /Gm /GX /Zi /Od"; } else { if($lib || $exe) { - print OUT "# ADD BASE CPP /nologo /W3 /GX /O2"; - @defines = (qw(WINVER=0x0600 _WIN32_WINNT=0x0600 _WIN32_IE=0x0700 WIN32 NDEBUG _MBCS _LIB)); + push @defines, qw(NDEBUG _MBCS _LIB); } else { - print OUT "# ADD BASE CPP /nologo /MD /W3 /GX /O2"; - @defines = (qw(WINVER=0x0600 _WIN32_WINNT=0x0600 _WIN32_IE=0x0700 WIN32 NDEBUG _WINDOWS _MBCS _USRDLL), ("\U${project}\E_EXPORTS")); + print OUT "/MD "; + push @defines, (qw(NDEBUG _WINDOWS _MBCS _USRDLL), ("\U${project}\E_EXPORTS")); } + print OUT "/W3 /GX /O2"; } foreach my $define (@defines) { @@ -603,7 +627,7 @@ sub _generate_dsp($$) { print OUT " /c"; print OUT "\r\n"; - my @defines2 = qw(_CRT_SECURE_NO_DEPRECATE _CRT_NONSTDC_NO_DEPRECATE); + my @defines2 = qw(_CRT_SECURE_NO_DEPRECATE _CRT_NONSTDC_NO_DEPRECATE USE_COMPILER_EXCEPTIONS _USE_MATH_DEFINES); if($debug) { if($lib) { print OUT "# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od"; @@ -634,6 +658,10 @@ sub _generate_dsp($$) { push @defines2, "__WINETEST_OUTPUT_DIR=\\\"$output_dir2\\\""; push @defines2, qw(__i386__ _X86_); + if ($project eq "wine") { + push @defines2, "WINE_UNICODE_API="; + } + if ($project =~ /_test$/) { push @includes, "$msvc_wine_dir\\$output_dir"; } @@ -773,6 +801,10 @@ sub _generate_dsp($$) { print OUT "SOURCE=$source_file\r\n"; + if ($project eq "wine" && $source_file eq ".\\config.c") { + print OUT "# ADD CPP /D BINDIR=\\\"\\\" /D DLLDIR=\\\"\\\" /D LIB_TO_BINDIR=\\\"\\\" /D LIB_TO_DLLDIR=\\\"\\\" /D BIN_TO_DLLDIR=\\\"\\\" /D LIB_TO_DATADIR=\\\"\\\" /D BIN_TO_DATADIR=\\\"\\\"\r\n"; + } + if($source_file =~ /^(.*?)\.spec$/) { my $basename = $1; @@ -785,7 +817,7 @@ sub _generate_dsp($$) { print OUT "InputPath=$spec_file\r\n"; print OUT "\r\n"; print OUT "BuildCmds= \\\r\n"; - print OUT "\t..\\..\\tools\\winebuild\\$output_dir\\winebuild.exe --def $spec_file > $def_file\r\n"; + print OUT "\t..\\..\\tools\\winebuild\\$output_dir\\winebuild.exe -w --def -k -o $def_file --export $spec_file\r\n"; print OUT "\r\n"; print OUT "\"$def_file\" : \$(SOURCE) \"\$(INTDIR)\" \"\$(OUTDIR)\"\r\n"; print OUT " \$(BuildCmds)\r\n"; @@ -832,6 +864,35 @@ sub _generate_dsp($$) { print OUT "# End Source File\r\n"; } + + foreach my $idl_h_file (@idl_h_files) { + $idl_h_file =~ s%/%\\%g; + if($idl_h_file !~ /^\./) { + $idl_h_file = ".\\$idl_h_file"; + } + + print OUT "# Begin Source File\r\n"; + print OUT "\r\n"; + + print OUT "SOURCE=$idl_h_file\r\n"; + + my $basename = $idl_h_file; + $basename =~ s/\.idl$//; + + print OUT "# PROP Ignore_Default_Tool 1\r\n"; + print OUT "# Begin Custom Build\r\n"; + print OUT "InputPath=$idl_h_file\r\n"; + print OUT "\r\n"; + print OUT "BuildCmds= \\\r\n"; + print OUT "\tmidl /nologo /I $wine_include_dir /client none /server none /notlb $idl_h_file /h $basename.h\r\n"; + print OUT "\r\n"; + print OUT "\"$basename.h\" : \$(SOURCE) \"\$(INTDIR)\" \"\$(OUTDIR)\"\r\n"; + print OUT " \$(BuildCmds)\r\n"; + print OUT "# End Custom Build\r\n"; + + print OUT "# End Source File\r\n"; + } + print OUT "# End Group\r\n"; print OUT "# Begin Group \"Header Files\"\r\n"; @@ -946,7 +1007,7 @@ sub _generate_wine_dsw($) { } elsif($project =~ /^(?:gdi32)_.+?$/) { @dependencies = (); } else { - @dependencies = ("wine", "winebuild"); + @dependencies = ("wine", "include", "winebuild"); } if($project =~ /^gdi32$/) { @@ -1115,54 +1176,37 @@ if ($options->wine) { sub _generate_config_h($) { local *OUT = shift; + my @defines; print OUT "#define __WINE_CONFIG_H\n"; print OUT "\n"; - my @headers = qw(direct.h fcntl.h io.h string.h process.h); + my @headers = qw(direct.h float.h memory.h io.h stdlib.h string.h process.h sys/stat.h sys/types.h); foreach my $header (@headers) { $header =~ y/\.\//__/; - print OUT "#define HAVE_\U$header\E\n"; - print OUT "\n"; + push @defines, "HAVE_\U$header\E 1"; } my @functions = qw( - _alldiv _allmul _allrem _aulldiv _aullrem - _access _chdir _close _lseek _mkdir _open _pclose _popen _read _rmdir _write _stat - _snprintf _spawnvp _stricmp _strnicmp _vsnprintf _wcsicmp - ecvt fcvt gcvt - memmove - strerror - wcslen + _pclose _popen _snprintf _spawnvp _stricmp _strnicmp _strdup + _strtoi64 _strtoui64 _vsnprintf + chsize memmove strdup spawnvp strerror vsnprintf ); foreach my $function (@functions) { - print OUT "#define HAVE_\U$function\E 1\n"; - print OUT "\n"; + push @defines, "HAVE_\U$function\E 1"; } - if(0) { - print OUT "#define NEED_STDCALL_DECORATION 1\n"; - print OUT "\n"; + my @types = qw( + long_long off_t size_t + ); + foreach my $type (@types) { + push @defines, "HAVE_\U$type\E 1"; } - print OUT "#define X_DISPLAY_MISSING 1\n"; - print OUT "\n"; - - print OUT "/* Define to a macro to generate an assembly function directive */\n"; - print OUT "#define __ASM_FUNC(name) \"\"\n"; - print OUT "\n"; - - print OUT "/* Define to a macro to generate an assembly name from a C symbol */\n"; - print OUT "#define __ASM_NAME(name) name\n"; - print OUT "\n"; - - print OUT "/* Define to the assembler keyword used to specify a word value */\n"; - print OUT "#define __ASM_SHORT \".short\"\n"; - print OUT "\n"; - - print OUT "/* Define to the assembler keyword used to specify an ASCII string */\n"; - print OUT "#define __ASM_STRING \".string\"\n"; - print OUT "\n"; + foreach my $define (sort(@defines)) { + print OUT "#define $define\n"; + print OUT "\n"; + } print OUT "/* Define to the address where bug reports for this package should be sent. */\n"; print OUT "#define PACKAGE_BUGREPORT \"\"\n"; @@ -1184,5 +1228,16 @@ sub _generate_config_h($) { print OUT "#define PACKAGE_VERSION \"YYYYMMDD\"\n"; print OUT "\n"; + print OUT "#define X_DISPLAY_MISSING 1\n"; + print OUT "\n"; + + print OUT "/* Define to a macro to generate an assembly function directive */\n"; + print OUT "#define __ASM_FUNC(name) \"\"\n"; + print OUT "\n"; + + print OUT "/* Define to a macro to generate an assembly name from a C symbol */\n"; + print OUT "#define __ASM_NAME(name) name\n"; + print OUT "\n"; + close(OUT); } diff --git a/tools/winebuild/build.h b/tools/winebuild/build.h index b13b99406a4..326a8380b53 100644 --- a/tools/winebuild/build.h +++ b/tools/winebuild/build.h @@ -143,14 +143,22 @@ extern enum target_platform target_platform; #define __attribute__(X) #endif +#ifndef DECLSPEC_NORETURN +# if defined(_MSC_VER) && (_MSC_VER >= 1200) && !defined(MIDL_PASS) +# define DECLSPEC_NORETURN __declspec(noreturn) +# else +# define DECLSPEC_NORETURN __attribute__((noreturn)) +# endif +#endif + extern void *xmalloc (size_t size); extern void *xrealloc (void *ptr, size_t size); extern char *xstrdup( const char *str ); extern char *strupper(char *s); extern int strendswith(const char* str, const char* end); -extern void fatal_error( const char *msg, ... ) +extern DECLSPEC_NORETURN void fatal_error( const char *msg, ... ) __attribute__ ((__format__ (__printf__, 1, 2))); -extern void fatal_perror( const char *msg, ... ) +extern DECLSPEC_NORETURN void fatal_perror( const char *msg, ... ) __attribute__ ((__format__ (__printf__, 1, 2))); extern void error( const char *msg, ... ) __attribute__ ((__format__ (__printf__, 1, 2))); -- 2.11.4.GIT