Jeff Latimer : usp10: Update ScriptGetCMap to conform to Windows.

Alexandre Julliard julliard at wine.codeweavers.com
Thu Jun 8 05:06:22 CDT 2006


Module: wine
Branch: refs/heads/master
Commit: 422ca43d14a8617f1d9fe06f1ddb565a5fd09d1e
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=422ca43d14a8617f1d9fe06f1ddb565a5fd09d1e

Author: Jeff Latimer <lats at yless4u.com.au>
Date:   Tue Jun  6 20:14:01 2006 +1000

usp10: Update ScriptGetCMap to conform to Windows.

---

 dlls/usp10/tests/usp10.c |   13 ++++++++++---
 dlls/usp10/usp10.c       |    2 +-
 2 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/dlls/usp10/tests/usp10.c b/dlls/usp10/tests/usp10.c
index a46f643..221f3a4 100644
--- a/dlls/usp10/tests/usp10.c
+++ b/dlls/usp10/tests/usp10.c
@@ -220,7 +220,7 @@ void test_ScriptGetCMap(unsigned short p
     int             cInChars;
     int             cChars;
     unsigned short  pwOutGlyphs3[256];
-    WCHAR           TestItem1[6] = {'T', 'e', 's', 't', 0x0166, 0}; 
+    WCHAR           TestItem1[6] = {'T', 'e', 's', 't', 'a', 0}; 
     DWORD           dwFlags;
     int             cnt;
 
@@ -249,10 +249,17 @@ void test_ScriptGetCMap(unsigned short p
     /* Set psc to NULL, to be able to check if a pointer is returned in psc */
     psc = NULL;
     hr = ScriptGetCMap(NULL, &psc, NULL, 0, 0, NULL);
-    ok( hr == E_INVALIDARG, "(NULL,&psc,NULL,0,0NULL), expected E_INVALIDARG, "
-                            "got %08x\n", (unsigned int)hr);
+    ok( hr == E_PENDING, "(NULL,&psc,NULL,0,0NULL), expected E_PENDING, "
+                         "got %08x\n", (unsigned int)hr);
     ok( psc == NULL, "Expected psc to be NULL, got %p\n", psc);
 
+    /* Set psc to NULL but add hdc, to be able to check if a pointer is returned in psc */
+    psc = NULL;
+    hr = ScriptGetCMap(hdc, &psc, NULL, 0, 0, NULL);
+    ok( hr == S_OK, "ScriptGetCMap(NULL,&psc,NULL,0,0,NULL), expected S_OK, "
+                    "got %08x\n", (unsigned int)hr);
+    ok( psc != NULL, "ScritpGetCMap expected psc to be not NULL\n");
+
     /* Set psc to NULL, to be able to check if a pointer is returned in psc */
     psc = NULL;
     hr = ScriptGetCMap(NULL, &psc, TestItem1, cInChars, dwFlags, pwOutGlyphs3);
diff --git a/dlls/usp10/usp10.c b/dlls/usp10/usp10.c
index abd4952..68e700e 100644
--- a/dlls/usp10/usp10.c
+++ b/dlls/usp10/usp10.c
@@ -555,7 +555,7 @@ HRESULT WINAPI ScriptGetCMap(HDC hdc, SC
     FIXME("(%p,%p,%s,%d,0x%lx,%p): semi-stub\n", hdc, psc, debugstr_wn(pwcInChars,cChars), 
                                                  cChars, dwFlags, pwOutGlyphs);
 
-    if  (!psc || !pwcInChars || !pwOutGlyphs)
+    if  (!psc)
         return E_INVALIDARG;
 
     if  (!hdc && !*psc) {




More information about the wine-cvs mailing list