[OLEACC] Sync with Wine Staging 4.0. CORE-15682
[reactos.git] / dll / win32 / oleacc / client.c
index 5b1f0ee..40e7fbd 100644 (file)
@@ -168,7 +168,7 @@ static HRESULT WINAPI Client_get_accName(IAccessible *iface, VARIANT varID, BSTR
     if(convert_child_id(&varID) != CHILDID_SELF || !IsWindow(This->hwnd))
         return E_INVALIDARG;
 
-    len = SendMessageW(This->hwnd, WM_GETTEXT, sizeof(name)/sizeof(WCHAR), (LPARAM)name);
+    len = SendMessageW(This->hwnd, WM_GETTEXT, ARRAY_SIZE(name), (LPARAM)name);
     if(!len)
         return S_FALSE;
 
@@ -286,7 +286,7 @@ static HRESULT WINAPI Client_get_accKeyboardShortcut(IAccessible *iface,
     if(convert_child_id(&varID) != CHILDID_SELF)
         return E_INVALIDARG;
 
-    len = SendMessageW(This->hwnd, WM_GETTEXT, sizeof(name)/sizeof(WCHAR), (LPARAM)name);
+    len = SendMessageW(This->hwnd, WM_GETTEXT, ARRAY_SIZE(name), (LPARAM)name);
     for(i=0; i<len; i++) {
         if(name[i] == '&')
             break;