ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
April
March
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
March 2016
----- 2025 -----
April 2025
March 2025
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
13 participants
263 discussions
Start a n
N
ew thread
[akhaldi] 70905: [OLEDLG] Sync with Wine Staging 1.9.4. CORE-10912
by akhaldi@svn.reactos.org
Author: akhaldi Date: Fri Mar 4 09:35:57 2016 New Revision: 70905 URL:
http://svn.reactos.org/svn/reactos?rev=70905&view=rev
Log: [OLEDLG] Sync with Wine Staging 1.9.4. CORE-10912 Modified: trunk/reactos/dll/win32/oledlg/oledlg_main.c trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/win32/oledlg/oledlg_main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/oledlg/oledlg_ma…
============================================================================== --- trunk/reactos/dll/win32/oledlg/oledlg_main.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/oledlg/oledlg_main.c [iso-8859-1] Fri Mar 4 09:35:57 2016 @@ -169,6 +169,7 @@ LoadStringW(OLEDLG_hInstance, IDS_VERBMENU_OBJECT, resstrW, sizeof(resstrW)/sizeof(WCHAR)); /* no object, or object without enumeration support */ if (!object || !enumverbs) { + RemoveMenu(hMenu, uPos, MF_BYPOSITION); InsertMenuW(hMenu, uPos, MF_BYPOSITION|MF_STRING|MF_GRAYED, idmin, resstrW); return FALSE; } Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Fri Mar 4 09:35:57 2016 @@ -146,7 +146,7 @@ reactos/dll/win32/oleacc # Synced to WineStaging-1.7.55 reactos/dll/win32/oleaut32 # Synced to WineStaging-1.9.4 reactos/dll/win32/olecli32 # Synced to WineStaging-1.7.55 -reactos/dll/win32/oledlg # Synced to WineStaging-1.7.55 +reactos/dll/win32/oledlg # Synced to WineStaging-1.9.4 reactos/dll/win32/olepro32 # Synced to WineStaging-1.7.55 reactos/dll/win32/olesvr32 # Synced to WineStaging-1.7.55 reactos/dll/win32/olethk32 # Synced to WineStaging-1.7.55
9 years, 1 month
1
0
0
0
[akhaldi] 70906: [OLEDLG_WINETEST] Sync with Wine Staging 1.9.4. CORE-10912
by akhaldi@svn.reactos.org
Author: akhaldi Date: Fri Mar 4 09:36:12 2016 New Revision: 70906 URL:
http://svn.reactos.org/svn/reactos?rev=70906&view=rev
Log: [OLEDLG_WINETEST] Sync with Wine Staging 1.9.4. CORE-10912 Modified: trunk/rostests/winetests/oledlg/main.c Modified: trunk/rostests/winetests/oledlg/main.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/oledlg/main.c?r…
============================================================================== --- trunk/rostests/winetests/oledlg/main.c [iso-8859-1] (original) +++ trunk/rostests/winetests/oledlg/main.c [iso-8859-1] Fri Mar 4 09:36:12 2016 @@ -303,6 +303,7 @@ static void test_OleUIAddVerbMenu(void) { + static const WCHAR cadabraW[] = {'c','a','d','a','b','r','a',0}; HMENU hMenu, verbmenu; MENUITEMINFOW info; WCHAR buffW[50]; @@ -418,6 +419,72 @@ ok(count == 5, "got %d\n", count); DestroyMenu(hMenu); + + /* try to add verb menu repeatedly, with same id */ + hMenu = CreatePopupMenu(); + + count = GetMenuItemCount(hMenu); + ok(count == 0, "got %d\n", count); + + verbmenu = NULL; + ret = OleUIAddVerbMenuW(NULL, NULL, hMenu, 0, 5, 10, TRUE, 3, &verbmenu); + ok(!ret, "got %d\n", ret); + ok(verbmenu == NULL, "got %p\n", verbmenu); + + count = GetMenuItemCount(hMenu); + ok(count == 1, "got %d\n", count); + + verbmenu = NULL; + ret = OleUIAddVerbMenuW(NULL, NULL, hMenu, 0, 5, 10, TRUE, 3, &verbmenu); + ok(!ret, "got %d\n", ret); + ok(verbmenu == NULL, "got %p\n", verbmenu); + + count = GetMenuItemCount(hMenu); + ok(count == 1, "got %d\n", count); + + /* same position, different id */ + verbmenu = NULL; + ret = OleUIAddVerbMenuW(NULL, NULL, hMenu, 0, 6, 10, TRUE, 3, &verbmenu); + ok(!ret, "got %d\n", ret); + ok(verbmenu == NULL, "got %p\n", verbmenu); + + count = GetMenuItemCount(hMenu); + ok(count == 1, "got %d\n", count); + + /* change added item string and state */ + memset(&info, 0, sizeof(info)); + info.cbSize = sizeof(info); + info.fMask = MIIM_STRING|MIIM_STATE; + info.fState = MFS_ENABLED; + info.dwTypeData = buffW; + lstrcpyW(buffW, cadabraW); + ret = SetMenuItemInfoW(hMenu, 0, TRUE, &info); + ok(ret, "got %d\n", ret); + + buffW[0] = 0; + GetMenuStringW(hMenu, 0, buffW, sizeof(buffW)/sizeof(buffW[0]), MF_BYPOSITION); + ok(!lstrcmpW(buffW, cadabraW), "got %s\n", wine_dbgstr_w(buffW)); + + verbmenu = NULL; + ret = OleUIAddVerbMenuW(NULL, NULL, hMenu, 0, 5, 10, TRUE, 3, &verbmenu); + ok(!ret, "got %d\n", ret); + ok(verbmenu == NULL, "got %p\n", verbmenu); + + memset(&info, 0, sizeof(info)); + info.cbSize = sizeof(info); + info.fMask = MIIM_STRING|MIIM_STATE; + buffW[0] = 0; + info.dwTypeData = buffW; + info.cch = sizeof(buffW)/sizeof(WCHAR); + ret = GetMenuItemInfoW(hMenu, 0, TRUE, &info); + ok(ret, "got %d\n", ret); + ok(lstrcmpW(buffW, cadabraW), "got %s\n", wine_dbgstr_w(buffW)); + ok(info.fState == MF_GRAYED, "got state 0x%08x\n", info.fState); + + count = GetMenuItemCount(hMenu); + ok(count == 1, "got %d\n", count); + + DestroyMenu(hMenu); } START_TEST(main)
9 years, 1 month
1
0
0
0
[akhaldi] 70903: [OLEAUT32] Sync with Wine Staging 1.9.4. CORE-10912
by akhaldi@svn.reactos.org
Author: akhaldi Date: Fri Mar 4 09:33:34 2016 New Revision: 70903 URL:
http://svn.reactos.org/svn/reactos?rev=70903&view=rev
Log: [OLEAUT32] Sync with Wine Staging 1.9.4. CORE-10912 Modified: trunk/reactos/dll/win32/oleaut32/oleaut.c trunk/reactos/dll/win32/oleaut32/olepicture.c trunk/reactos/dll/win32/oleaut32/tmarshal.c trunk/reactos/dll/win32/oleaut32/typelib.c trunk/reactos/dll/win32/oleaut32/typelib.h trunk/reactos/dll/win32/oleaut32/usrmarshal.c trunk/reactos/dll/win32/oleaut32/varformat.c trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/win32/oleaut32/oleaut.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/oleaut32/oleaut.…
============================================================================== --- trunk/reactos/dll/win32/oleaut32/oleaut.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/oleaut32/oleaut.c [iso-8859-1] Fri Mar 4 09:33:34 2016 @@ -67,6 +67,9 @@ static CRITICAL_SECTION cs_bstr_cache = { &cs_bstr_cache_dbg, -1, 0, 0, 0, 0 }; typedef struct { +#ifdef _WIN64 + DWORD pad; +#endif DWORD size; union { char ptr[1]; @@ -100,24 +103,37 @@ return CONTAINING_RECORD(str, bstr_t, u.str); } -static inline bstr_cache_entry_t *get_cache_entry(size_t size) -{ - unsigned cache_idx = FIELD_OFFSET(bstr_t, u.ptr[size-1])/BUCKET_SIZE; +static inline bstr_cache_entry_t *get_cache_entry_from_idx(unsigned cache_idx) +{ return bstr_cache_enabled && cache_idx < sizeof(bstr_cache)/sizeof(*bstr_cache) ? bstr_cache + cache_idx : NULL; } +static inline bstr_cache_entry_t *get_cache_entry(size_t size) +{ + unsigned cache_idx = FIELD_OFFSET(bstr_t, u.ptr[size+sizeof(WCHAR)-1])/BUCKET_SIZE; + return get_cache_entry_from_idx(cache_idx); +} + +static inline bstr_cache_entry_t *get_cache_entry_from_alloc_size(SIZE_T alloc_size) +{ + unsigned cache_idx; + if (alloc_size < BUCKET_SIZE) return NULL; + cache_idx = (alloc_size - BUCKET_SIZE) / BUCKET_SIZE; + return get_cache_entry_from_idx(cache_idx); +} + static bstr_t *alloc_bstr(size_t size) { - bstr_cache_entry_t *cache_entry = get_cache_entry(size+sizeof(WCHAR)); + bstr_cache_entry_t *cache_entry = get_cache_entry(size); bstr_t *ret; if(cache_entry) { EnterCriticalSection(&cs_bstr_cache); if(!cache_entry->cnt) { - cache_entry = get_cache_entry(size+sizeof(WCHAR)+BUCKET_SIZE); + cache_entry = get_cache_entry(size+BUCKET_SIZE); if(cache_entry && !cache_entry->cnt) cache_entry = NULL; } @@ -132,19 +148,16 @@ if(cache_entry) { if(WARN_ON(heap)) { - size_t tail; - - memset(ret, ARENA_INUSE_FILLER, FIELD_OFFSET(bstr_t, u.ptr[size+sizeof(WCHAR)])); - tail = bstr_alloc_size(size) - FIELD_OFFSET(bstr_t, u.ptr[size+sizeof(WCHAR)]); - if(tail) - memset(ret->u.ptr+size+sizeof(WCHAR), ARENA_TAIL_FILLER, tail); + size_t fill_size = (FIELD_OFFSET(bstr_t, u.ptr[size])+2*sizeof(WCHAR)-1) & ~(sizeof(WCHAR)-1); + memset(ret, ARENA_INUSE_FILLER, fill_size); + memset((char *)ret+fill_size, ARENA_TAIL_FILLER, bstr_alloc_size(size)-fill_size); } ret->size = size; return ret; } } - ret = HeapAlloc(GetProcessHeap(), 0, bstr_alloc_size(size)); + ret = CoTaskMemAlloc(bstr_alloc_size(size)); if(ret) ret->size = size; return ret; @@ -217,6 +230,16 @@ return SysAllocStringLen(str, lstrlenW(str)); } +static inline IMalloc *get_malloc(void) +{ + static IMalloc *malloc; + + if (!malloc) + CoGetMalloc(1, &malloc); + + return malloc; +} + /****************************************************************************** * SysFreeString [OLEAUT32.6] * @@ -236,12 +259,19 @@ { bstr_cache_entry_t *cache_entry; bstr_t *bstr; + IMalloc *malloc = get_malloc(); + SIZE_T alloc_size; if(!str) return; bstr = bstr_from_str(str); - cache_entry = get_cache_entry(bstr->size+sizeof(WCHAR)); + + alloc_size = IMalloc_GetSize(malloc, bstr); + if (alloc_size == ~0UL) + return; + + cache_entry = get_cache_entry_from_alloc_size(alloc_size); if(cache_entry) { unsigned i; @@ -262,8 +292,7 @@ cache_entry->cnt++; if(WARN_ON(heap)) { - unsigned n = bstr_alloc_size(bstr->size) / sizeof(DWORD) - 1; - bstr->size = ARENA_FREE_FILLER; + unsigned n = (alloc_size-FIELD_OFFSET(bstr_t, u.ptr))/sizeof(DWORD); for(i=0; i<n; i++) bstr->u.dwptr[i] = ARENA_FREE_FILLER; } @@ -275,7 +304,7 @@ LeaveCriticalSection(&cs_bstr_cache); } - HeapFree(GetProcessHeap(), 0, bstr); + CoTaskMemFree(bstr); } /****************************************************************************** @@ -342,29 +371,25 @@ { /* Detect integer overflow. */ if (len >= ((UINT_MAX-sizeof(WCHAR)-sizeof(DWORD))/sizeof(WCHAR))) - return 0; + return FALSE; if (*old!=NULL) { - BSTR old_copy = *old; DWORD newbytelen = len*sizeof(WCHAR); - bstr_t *bstr = HeapReAlloc(GetProcessHeap(),0,((DWORD*)*old)-1,bstr_alloc_size(newbytelen)); + bstr_t *old_bstr = bstr_from_str(*old); + bstr_t *bstr = CoTaskMemRealloc(old_bstr, bstr_alloc_size(newbytelen)); + + if (!bstr) return FALSE; + *old = bstr->u.str; bstr->size = newbytelen; - /* Subtle hidden feature: The old string data is still there - * when 'in' is NULL! - * Some Microsoft program needs it. - * FIXME: Is it a sideeffect of BSTR caching? - */ - if (str && old_copy!=str) memmove(*old, str, newbytelen); - (*old)[len] = 0; + /* The old string data is still there when str is NULL */ + if (str && old_bstr->u.str != str) memmove(bstr->u.str, str, newbytelen); + bstr->u.str[len] = 0; } else { - /* - * Allocate the new string - */ *old = SysAllocStringLen(str, len); } - return 1; + return TRUE; } /****************************************************************************** @@ -401,10 +426,11 @@ if(str) { memcpy(bstr->u.ptr, str, len); - bstr->u.ptr[len] = bstr->u.ptr[len+1] = 0; + bstr->u.ptr[len] = 0; }else { - memset(bstr->u.ptr, 0, len+sizeof(WCHAR)); - } + memset(bstr->u.ptr, 0, len+1); + } + bstr->u.str[(len+sizeof(WCHAR)-1)/sizeof(WCHAR)] = 0; return bstr->u.str; } Modified: trunk/reactos/dll/win32/oleaut32/olepicture.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/oleaut32/olepict…
============================================================================== --- trunk/reactos/dll/win32/oleaut32/olepicture.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/oleaut32/olepicture.c [iso-8859-1] Fri Mar 4 09:33:34 2016 @@ -452,7 +452,7 @@ if (!*ppvObject) { - FIXME("() : asking for un supported interface %s\n",debugstr_guid(riid)); + FIXME("() : asking for unsupported interface %s\n",debugstr_guid(riid)); return E_NOINTERFACE; } Modified: trunk/reactos/dll/win32/oleaut32/tmarshal.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/oleaut32/tmarsha…
============================================================================== --- trunk/reactos/dll/win32/oleaut32/tmarshal.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/oleaut32/tmarshal.c [iso-8859-1] Fri Mar 4 09:33:34 2016 @@ -58,12 +58,14 @@ if(buf->base) { + newsize = max(newsize, buf->size * 2); buf->base = HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, buf->base, newsize); if(!buf->base) return E_OUTOFMEMORY; } else { + newsize = max(newsize, 256); buf->base = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, newsize); if(!buf->base) return E_OUTOFMEMORY; @@ -79,7 +81,7 @@ if(buf->size - buf->curoff < size) { - hr = xbuf_resize(buf, buf->size + size + 100); + hr = xbuf_resize(buf, buf->size + size); if(FAILED(hr)) return hr; } memcpy(buf->base+buf->curoff,stuff,size); Modified: trunk/reactos/dll/win32/oleaut32/typelib.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/oleaut32/typelib…
============================================================================== --- trunk/reactos/dll/win32/oleaut32/typelib.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/oleaut32/typelib.c [iso-8859-1] Fri Mar 4 09:33:34 2016 @@ -302,7 +302,7 @@ WCHAR *nameW; DWORD len; - if (tlib->major_version != wMaj || tlib->minor_version < wMin) + if ((wMaj != 0xffff || wMin != 0xffff) && (tlib->major_version != wMaj || tlib->minor_version < wMin)) return TYPE_E_LIBNOTREGISTERED; nameW = (WCHAR*)((BYTE*)data.lpSectionBase + tlib->name_offset); @@ -403,11 +403,21 @@ * Success: S_OK * Failure: Status */ -HRESULT WINAPI CreateTypeLib( - SYSKIND syskind, LPCOLESTR szFile, ICreateTypeLib** ppctlib -) { - FIXME("(%d,%s,%p), stub!\n",syskind,debugstr_w(szFile),ppctlib); - return E_FAIL; +HRESULT WINAPI CreateTypeLib(SYSKIND syskind, LPCOLESTR file, ICreateTypeLib **ctlib) +{ + ICreateTypeLib2 *typelib2; + HRESULT hres; + + FIXME("(%d, %s, %p): forwarding to CreateTypeLib2\n", syskind, debugstr_w(file), ctlib); + + hres = CreateTypeLib2(syskind, file, &typelib2); + if(SUCCEEDED(hres)) + { + hres = ICreateTypeLib2_QueryInterface(typelib2, &IID_ICreateTypeLib, (void **)&ctlib); + ICreateTypeLib2_Release(typelib2); + } + + return hres; } /****************************************************************************** @@ -515,7 +525,7 @@ res= LoadTypeLib(bstr, ppTLib); SysFreeString(bstr); - if (*ppTLib) + if ((wVerMajor!=0xffff || wVerMinor!=0xffff) && *ppTLib) { TLIBATTR *attr; @@ -3696,6 +3706,87 @@ return TRUE; } +struct bitstream +{ + const BYTE *buffer; + DWORD length; + WORD current; +}; + +static const char *lookup_code(const BYTE *table, DWORD table_size, struct bitstream *bits) +{ + const BYTE *p = table; + + while (p < table + table_size && *p == 0x80) + { + if (p + 2 >= table + table_size) return NULL; + + if (!(bits->current & 0xff)) + { + if (!bits->length) return NULL; + bits->current = (*bits->buffer << 8) | 1; + bits->buffer++; + bits->length--; + } + + if (bits->current & 0x8000) + { + p += 3; + } + else + { + p = table + (*(p + 2) | (*(p + 1) << 8)); + } + + bits->current <<= 1; + } + + if (p + 1 < table + table_size && *(p + 1)) + { + /* FIXME: Whats the meaning of *p? */ + const BYTE *q = p + 1; + while (q < table + table_size && *q) q++; + return (q < table + table_size) ? (const char *)(p + 1) : NULL; + } + + return NULL; +} + +static const TLBString *decode_string(const BYTE *table, const char *stream, DWORD stream_length, ITypeLibImpl *lib) +{ + DWORD buf_size, table_size; + const char *p; + struct bitstream bits; + BSTR buf; + TLBString *tlbstr; + + if (!stream_length) return NULL; + + bits.buffer = (const BYTE *)stream; + bits.length = stream_length; + bits.current = 0; + + buf_size = *(const WORD *)table; + table += sizeof(WORD); + table_size = *(const DWORD *)table; + table += sizeof(DWORD); + + buf = SysAllocStringLen(NULL, buf_size); + buf[0] = 0; + + while ((p = lookup_code(table, table_size, &bits))) + { + static const WCHAR spaceW[] = { ' ',0 }; + if (buf[0]) strcatW(buf, spaceW); + MultiByteToWideChar(CP_ACP, 0, p, -1, buf + strlenW(buf), buf_size - strlenW(buf)); + } + + tlbstr = TLB_append_str(&lib->string_list, buf); + SysFreeString(buf); + + return tlbstr; +} + static WORD SLTG_ReadString(const char *ptr, const TLBString **pStr, ITypeLibImpl *lib) { WORD bytelen; @@ -4027,7 +4118,7 @@ } static void SLTG_DoVars(char *pBlk, char *pFirstItem, ITypeInfoImpl *pTI, unsigned short cVars, - const char *pNameTable, const sltg_ref_lookup_t *ref_lookup) + const char *pNameTable, const sltg_ref_lookup_t *ref_lookup, const BYTE *hlp_strings) { TLBVarDesc *pVarDesc; const TLBString *prevName = NULL; @@ -4056,6 +4147,12 @@ TRACE_(typelib)("name: %s\n", debugstr_w(TLB_get_bstr(pVarDesc->Name))); TRACE_(typelib)("byte_offs = 0x%x\n", pItem->byte_offs); TRACE_(typelib)("memid = 0x%x\n", pItem->memid); + + if (pItem->helpstring != 0xffff) + { + pVarDesc->HelpString = decode_string(hlp_strings, pBlk + pItem->helpstring, pNameTable - pBlk, pTI->pTypeLib); + TRACE_(typelib)("helpstring = %s\n", debugstr_w(pVarDesc->HelpString->str)); + } if(pItem->flags & 0x02) pType = &pItem->type; @@ -4138,7 +4235,8 @@ } static void SLTG_DoFuncs(char *pBlk, char *pFirstItem, ITypeInfoImpl *pTI, - unsigned short cFuncs, char *pNameTable, const sltg_ref_lookup_t *ref_lookup) + unsigned short cFuncs, char *pNameTable, const sltg_ref_lookup_t *ref_lookup, + const BYTE *hlp_strings) { SLTG_Function *pFunc; unsigned short i; @@ -4175,6 +4273,8 @@ pFuncDesc->funcdesc.cParams = pFunc->nacc >> 3; pFuncDesc->funcdesc.cParamsOpt = (pFunc->retnextopt & 0x7e) >> 1; pFuncDesc->funcdesc.oVft = pFunc->vtblpos & ~1; + if (pFunc->helpstring != 0xffff) + pFuncDesc->HelpString = decode_string(hlp_strings, pBlk + pFunc->helpstring, pNameTable - pBlk, pTI->pTypeLib); if(pFunc->magic & SLTG_FUNCTION_FLAGS_PRESENT) pFuncDesc->funcdesc.wFuncFlags = pFunc->funcflags; @@ -4193,7 +4293,7 @@ pArg = (WORD*)(pBlk + pFunc->arg_off); for(param = 0; param < pFuncDesc->funcdesc.cParams; param++) { - char *paramName = pNameTable + *pArg; + char *paramName = pNameTable + (*pArg & ~1); BOOL HaveOffs; /* If arg type follows then paramName points to the 2nd letter of the name, else the next WORD is an offset to @@ -4204,17 +4304,14 @@ meaning that the next WORD is the type, the latter meaning that the next WORD is an offset to the type. */ - HaveOffs = FALSE; - if(*pArg == 0xffff) + if(*pArg == 0xffff || *pArg == 0xfffe) paramName = NULL; - else if(*pArg == 0xfffe) { - paramName = NULL; - HaveOffs = TRUE; - } - else if(paramName[-1] && !isalnum(paramName[-1])) - HaveOffs = TRUE; - + + HaveOffs = !(*pArg & 1); pArg++; + + TRACE_(typelib)("param %d: paramName %s, *pArg %#x\n", + param, debugstr_a(paramName), *pArg); if(HaveOffs) { /* the next word is an offset to type */ pType = (WORD*)(pBlk + *pArg); @@ -4222,8 +4319,6 @@ &pFuncDesc->funcdesc.lprgelemdescParam[param], ref_lookup); pArg++; } else { - if(paramName) - paramName--; pArg = SLTG_DoElem(pArg, pBlk, &pFuncDesc->funcdesc.lprgelemdescParam[param], ref_lookup); } @@ -4267,7 +4362,7 @@ static void SLTG_ProcessInterface(char *pBlk, ITypeInfoImpl *pTI, char *pNameTable, SLTG_TypeInfoHeader *pTIHeader, - const SLTG_TypeInfoTail *pTITail) + const SLTG_TypeInfoTail *pTITail, const BYTE *hlp_strings) { char *pFirstItem; sltg_ref_lookup_t *ref_lookup = NULL; @@ -4284,7 +4379,7 @@ } if (pTITail->funcs_off != 0xffff) - SLTG_DoFuncs(pBlk, pBlk + pTITail->funcs_off, pTI, pTITail->cFuncs, pNameTable, ref_lookup); + SLTG_DoFuncs(pBlk, pBlk + pTITail->funcs_off, pTI, pTITail->cFuncs, pNameTable, ref_lookup, hlp_strings); heap_free(ref_lookup); @@ -4294,9 +4389,9 @@ static void SLTG_ProcessRecord(char *pBlk, ITypeInfoImpl *pTI, const char *pNameTable, SLTG_TypeInfoHeader *pTIHeader, - const SLTG_TypeInfoTail *pTITail) -{ - SLTG_DoVars(pBlk, pBlk + pTITail->vars_off, pTI, pTITail->cVars, pNameTable, NULL); + const SLTG_TypeInfoTail *pTITail, const BYTE *hlp_strings) +{ + SLTG_DoVars(pBlk, pBlk + pTITail->vars_off, pTI, pTITail->cVars, pNameTable, NULL, hlp_strings); } static void SLTG_ProcessAlias(char *pBlk, ITypeInfoImpl *pTI, @@ -4329,7 +4424,7 @@ static void SLTG_ProcessDispatch(char *pBlk, ITypeInfoImpl *pTI, char *pNameTable, SLTG_TypeInfoHeader *pTIHeader, - const SLTG_TypeInfoTail *pTITail) + const SLTG_TypeInfoTail *pTITail, const BYTE *hlp_strings) { sltg_ref_lookup_t *ref_lookup = NULL; if (pTIHeader->href_table != 0xffffffff) @@ -4337,10 +4432,10 @@ pNameTable); if (pTITail->vars_off != 0xffff) - SLTG_DoVars(pBlk, pBlk + pTITail->vars_off, pTI, pTITail->cVars, pNameTable, ref_lookup); + SLTG_DoVars(pBlk, pBlk + pTITail->vars_off, pTI, pTITail->cVars, pNameTable, ref_lookup, hlp_strings); if (pTITail->funcs_off != 0xffff) - SLTG_DoFuncs(pBlk, pBlk + pTITail->funcs_off, pTI, pTITail->cFuncs, pNameTable, ref_lookup); + SLTG_DoFuncs(pBlk, pBlk + pTITail->funcs_off, pTI, pTITail->cFuncs, pNameTable, ref_lookup, hlp_strings); if (pTITail->impls_off != 0xffff) SLTG_DoImpls(pBlk + pTITail->impls_off, pTI, FALSE, ref_lookup); @@ -4357,14 +4452,14 @@ static void SLTG_ProcessEnum(char *pBlk, ITypeInfoImpl *pTI, const char *pNameTable, SLTG_TypeInfoHeader *pTIHeader, - const SLTG_TypeInfoTail *pTITail) -{ - SLTG_DoVars(pBlk, pBlk + pTITail->vars_off, pTI, pTITail->cVars, pNameTable, NULL); + const SLTG_TypeInfoTail *pTITail, const BYTE *hlp_strings) +{ + SLTG_DoVars(pBlk, pBlk + pTITail->vars_off, pTI, pTITail->cVars, pNameTable, NULL, hlp_strings); } static void SLTG_ProcessModule(char *pBlk, ITypeInfoImpl *pTI, char *pNameTable, SLTG_TypeInfoHeader *pTIHeader, - const SLTG_TypeInfoTail *pTITail) + const SLTG_TypeInfoTail *pTITail, const BYTE *hlp_strings) { sltg_ref_lookup_t *ref_lookup = NULL; if (pTIHeader->href_table != 0xffffffff) @@ -4372,10 +4467,10 @@ pNameTable); if (pTITail->vars_off != 0xffff) - SLTG_DoVars(pBlk, pBlk + pTITail->vars_off, pTI, pTITail->cVars, pNameTable, ref_lookup); + SLTG_DoVars(pBlk, pBlk + pTITail->vars_off, pTI, pTITail->cVars, pNameTable, ref_lookup, hlp_strings); if (pTITail->funcs_off != 0xffff) - SLTG_DoFuncs(pBlk, pBlk + pTITail->funcs_off, pTI, pTITail->cFuncs, pNameTable, ref_lookup); + SLTG_DoFuncs(pBlk, pBlk + pTITail->funcs_off, pTI, pTITail->cFuncs, pNameTable, ref_lookup, hlp_strings); heap_free(ref_lookup); if (TRACE_ON(typelib)) dump_TypeInfo(pTI); @@ -4384,17 +4479,17 @@ /* Because SLTG_OtherTypeInfo is such a painful struct, we make a more manageable copy of it into this */ typedef struct { - WORD small_no; char *index_name; char *other_name; WORD res1a; WORD name_offs; - WORD more_bytes; + WORD hlpstr_len; char *extra; WORD res20; DWORD helpcontext; WORD res26; GUID uuid; + WORD typekind; } SLTG_InternalOtherTypeInfo; /**************************************************************************** @@ -4413,8 +4508,8 @@ LPVOID pBlk, pFirstBlk; SLTG_LibBlk *pLibBlk; SLTG_InternalOtherTypeInfo *pOtherTypeInfoBlks; - char *pAfterOTIBlks = NULL; char *pNameTable, *ptr; + const BYTE *hlp_strings; int i; DWORD len, order; ITypeInfoImpl **ppTypeInfoImpl; @@ -4465,9 +4560,9 @@ /* We'll set up a ptr to the main library block, which is the last one. */ - for(pBlk = pFirstBlk, order = pHeader->first_blk - 1, i = 0; + for(pBlk = pFirstBlk, order = pHeader->first_blk - 1; pBlkEntry[order].next != 0; - order = pBlkEntry[order].next - 1, i++) { + order = pBlkEntry[order].next - 1) { pBlk = (char*)pBlk + pBlkEntry[order].len; } pLibBlk = pBlk; @@ -4480,9 +4575,10 @@ len += 0x40; /* And now TypeInfoCount of SLTG_OtherTypeInfo */ + pTypeLibImpl->TypeInfoCount = *(WORD *)((char *)pLibBlk + len); + len += sizeof(WORD); pOtherTypeInfoBlks = heap_alloc_zero(sizeof(*pOtherTypeInfoBlks) * pTypeLibImpl->TypeInfoCount); - ptr = (char*)pLibBlk + len; @@ -4490,43 +4586,44 @@ WORD w, extra; len = 0; - pOtherTypeInfoBlks[i].small_no = *(WORD*)ptr; - - w = *(WORD*)(ptr + 2); + w = *(WORD*)ptr; if(w != 0xffff) { len += w; pOtherTypeInfoBlks[i].index_name = heap_alloc(w+1); - memcpy(pOtherTypeInfoBlks[i].index_name, ptr + 4, w); + memcpy(pOtherTypeInfoBlks[i].index_name, ptr + 2, w); pOtherTypeInfoBlks[i].index_name[w] = '\0'; } - w = *(WORD*)(ptr + 4 + len); + w = *(WORD*)(ptr + 2 + len); if(w != 0xffff) { - TRACE_(typelib)("\twith %s\n", debugstr_an(ptr + 6 + len, w)); + TRACE_(typelib)("\twith %s\n", debugstr_an(ptr + 4 + len, w)); + pOtherTypeInfoBlks[i].other_name = heap_alloc(w+1); + memcpy(pOtherTypeInfoBlks[i].other_name, ptr + 4 + len, w); + pOtherTypeInfoBlks[i].other_name[w] = '\0'; len += w; - pOtherTypeInfoBlks[i].other_name = heap_alloc(w+1); - memcpy(pOtherTypeInfoBlks[i].other_name, ptr + 6 + len, w); - pOtherTypeInfoBlks[i].other_name[w] = '\0'; } - pOtherTypeInfoBlks[i].res1a = *(WORD*)(ptr + len + 6); - pOtherTypeInfoBlks[i].name_offs = *(WORD*)(ptr + len + 8); - extra = pOtherTypeInfoBlks[i].more_bytes = *(WORD*)(ptr + 10 + len); + pOtherTypeInfoBlks[i].res1a = *(WORD*)(ptr + 4 + len); + pOtherTypeInfoBlks[i].name_offs = *(WORD*)(ptr + 6 + len); + extra = pOtherTypeInfoBlks[i].hlpstr_len = *(WORD*)(ptr + 8 + len); if(extra) { pOtherTypeInfoBlks[i].extra = heap_alloc(extra); - memcpy(pOtherTypeInfoBlks[i].extra, ptr + 12, extra); + memcpy(pOtherTypeInfoBlks[i].extra, ptr + 10 + len, extra); len += extra; } - pOtherTypeInfoBlks[i].res20 = *(WORD*)(ptr + 12 + len); - pOtherTypeInfoBlks[i].helpcontext = *(DWORD*)(ptr + 14 + len); - pOtherTypeInfoBlks[i].res26 = *(WORD*)(ptr + 18 + len); - memcpy(&pOtherTypeInfoBlks[i].uuid, ptr + 20 + len, sizeof(GUID)); + pOtherTypeInfoBlks[i].res20 = *(WORD*)(ptr + 10 + len); + pOtherTypeInfoBlks[i].helpcontext = *(DWORD*)(ptr + 12 + len); + pOtherTypeInfoBlks[i].res26 = *(WORD*)(ptr + 16 + len); + memcpy(&pOtherTypeInfoBlks[i].uuid, ptr + 18 + len, sizeof(GUID)); + pOtherTypeInfoBlks[i].typekind = *(WORD*)(ptr + 18 + sizeof(GUID) + len); len += sizeof(SLTG_OtherTypeInfo); ptr += len; } - pAfterOTIBlks = ptr; - - /* Skip this WORD and get the next DWORD */ - len = *(DWORD*)(pAfterOTIBlks + 2); + /* Get the next DWORD */ + len = *(DWORD*)ptr; + + hlp_strings = (const BYTE *)ptr + sizeof(DWORD); + TRACE("max help string length %#x, help strings length %#x\n", + *(WORD *)hlp_strings, *(DWORD *)(hlp_strings + 2)); /* Now add this to pLibBLk look at what we're pointing at and possibly add 0x20, then add 0x216, sprinkle a bit a magic @@ -4592,6 +4689,7 @@ (*ppTypeInfoImpl)->index = i; (*ppTypeInfoImpl)->Name = SLTG_ReadName(pNameTable, pOtherTypeInfoBlks[i].name_offs, pTypeLibImpl); (*ppTypeInfoImpl)->dwHelpContext = pOtherTypeInfoBlks[i].helpcontext; + (*ppTypeInfoImpl)->DocString = decode_string(hlp_strings, pOtherTypeInfoBlks[i].extra, pOtherTypeInfoBlks[i].hlpstr_len, pTypeLibImpl); (*ppTypeInfoImpl)->guid = TLB_append_guid(&pTypeLibImpl->guid_list, &pOtherTypeInfoBlks[i].uuid, 2); (*ppTypeInfoImpl)->typekind = pTIHeader->typekind; (*ppTypeInfoImpl)->wMajorVerNum = pTIHeader->major_version; @@ -4624,17 +4722,17 @@ switch(pTIHeader->typekind) { case TKIND_ENUM: SLTG_ProcessEnum((char *)(pMemHeader + 1), *ppTypeInfoImpl, pNameTable, - pTIHeader, pTITail); + pTIHeader, pTITail, hlp_strings); break; case TKIND_RECORD: SLTG_ProcessRecord((char *)(pMemHeader + 1), *ppTypeInfoImpl, pNameTable, - pTIHeader, pTITail); + pTIHeader, pTITail, hlp_strings); break; case TKIND_INTERFACE: SLTG_ProcessInterface((char *)(pMemHeader + 1), *ppTypeInfoImpl, pNameTable, - pTIHeader, pTITail); + pTIHeader, pTITail, hlp_strings); break; case TKIND_COCLASS: @@ -4649,12 +4747,12 @@ case TKIND_DISPATCH: SLTG_ProcessDispatch((char *)(pMemHeader + 1), *ppTypeInfoImpl, pNameTable, - pTIHeader, pTITail); + pTIHeader, pTITail, hlp_strings); break; case TKIND_MODULE: SLTG_ProcessModule((char *)(pMemHeader + 1), *ppTypeInfoImpl, pNameTable, - pTIHeader, pTITail); + pTIHeader, pTITail, hlp_strings); break; default: @@ -9305,7 +9403,7 @@ { WMSFT_SegContents *cdguids_seg = &file->cdguids_seg; DWORD ret = cdguids_seg->len, offs; - MSFT_CDGuid *cdguid = cdguids_seg->data; + MSFT_CDGuid *cdguid; TLBCustData *cd; if(list_empty(custdata_list)) @@ -9314,8 +9412,10 @@ cdguids_seg->len += sizeof(MSFT_CDGuid) * list_count(custdata_list); if(!cdguids_seg->data){ cdguid = cdguids_seg->data = heap_alloc(cdguids_seg->len); - }else + }else { cdguids_seg->data = heap_realloc(cdguids_seg->data, cdguids_seg->len); + cdguid = (MSFT_CDGuid*)((char*)cdguids_seg->data + ret); + } offs = ret + sizeof(MSFT_CDGuid); LIST_FOR_EACH_ENTRY(cd, custdata_list, TLBCustData, entry){ @@ -10007,7 +10107,7 @@ else file.header.NameOffset = -1; - file.header.CustomDataOffset = -1; /* TODO SetCustData not impl yet */ + file.header.CustomDataOffset = WMSFT_compile_custdata(&This->custdata_list, &file); if(This->guid) file.header.posguid = This->guid->offset; @@ -10157,8 +10257,16 @@ REFGUID guid, VARIANT *varVal) { ITypeLibImpl *This = impl_from_ICreateTypeLib2(iface); - FIXME("%p %s %p - stub\n", This, debugstr_guid(guid), varVal); - return E_NOTIMPL; + TLBGuid *tlbguid; + + TRACE("%p %s %p\n", This, debugstr_guid(guid), varVal); + + if (!guid || !varVal) + return E_INVALIDARG; + + tlbguid = TLB_append_guid(&This->guid_list, guid, -1); + + return TLB_set_custdata(&This->custdata_list, tlbguid, varVal); } static HRESULT WINAPI ICreateTypeLib2_fnSetHelpStringContext(ICreateTypeLib2 *iface, Modified: trunk/reactos/dll/win32/oleaut32/typelib.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/oleaut32/typelib…
============================================================================== --- trunk/reactos/dll/win32/oleaut32/typelib.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/oleaut32/typelib.h [iso-8859-1] Fri Mar 4 09:33:34 2016 @@ -381,18 +381,18 @@ /* we then get 0x40 bytes worth of 0xffff or small numbers followed by nrOfFileBlks - 2 of these */ typedef struct { - WORD small_no; SLTG_Name index_name; /* This refers to a name in the directory */ SLTG_Name other_name; /* Another one of these weird names */ WORD res1a; /* 0xffff */ WORD name_offs; /* offset to name in name table */ - WORD more_bytes; /* if this is non-zero we get this many + WORD hlpstr_len; /* if this is non-zero we get this many bytes before the next element, which seem to reference the docstring of the type ? */ WORD res20; /* 0xffff */ DWORD helpcontext; WORD res26; /* 0xffff */ GUID uuid; + WORD typekind; } SLTG_OtherTypeInfo; /* Next we get WORD 0x0003 followed by a DWORD which if we add to Modified: trunk/reactos/dll/win32/oleaut32/usrmarshal.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/oleaut32/usrmars…
============================================================================== --- trunk/reactos/dll/win32/oleaut32/usrmarshal.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/oleaut32/usrmarshal.c [iso-8859-1] Fri Mar 4 09:33:34 2016 @@ -333,10 +333,6 @@ ptr = *(DWORD*)Buffer; Buffer += sizeof(DWORD); - /* Clear any existing interface which WdtpInterfacePointer_UserUnmarshal() - would try to release. This has been done already with a VariantClear(). */ - *ppunk = NULL; - if(!ptr) return Buffer; @@ -504,10 +500,22 @@ { VariantClear(pvar); V_BYREF(pvar) = CoTaskMemAlloc(mem_size); + memset(V_BYREF(pvar), 0, mem_size); } else if (!V_BYREF(pvar)) + { V_BYREF(pvar) = CoTaskMemAlloc(mem_size); - memcpy(V_BYREF(pvar), Pos, type_size); + memset(V_BYREF(pvar), 0, mem_size); + } + + if(!(header->vt & VT_ARRAY) + && (header->vt & VT_TYPEMASK) != VT_BSTR + && (header->vt & VT_TYPEMASK) != VT_VARIANT + && (header->vt & VT_TYPEMASK) != VT_UNKNOWN + && (header->vt & VT_TYPEMASK) != VT_DISPATCH + && (header->vt & VT_TYPEMASK) != VT_RECORD) + memcpy(V_BYREF(pvar), Pos, type_size); + if((header->vt & VT_TYPEMASK) != VT_VARIANT) Pos += type_size; else @@ -516,7 +524,17 @@ else { VariantClear(pvar); - if((header->vt & VT_TYPEMASK) == VT_DECIMAL) + if(header->vt & VT_ARRAY) + V_ARRAY(pvar) = NULL; + else if((header->vt & VT_TYPEMASK) == VT_BSTR) + V_BSTR(pvar) = NULL; + else if((header->vt & VT_TYPEMASK) == VT_UNKNOWN) + V_UNKNOWN(pvar) = NULL; + else if((header->vt & VT_TYPEMASK) == VT_DISPATCH) + V_DISPATCH(pvar) = NULL; + else if((header->vt & VT_TYPEMASK) == VT_RECORD) + V_RECORD(pvar) = NULL; + else if((header->vt & VT_TYPEMASK) == VT_DECIMAL) memcpy(pvar, Pos, type_size); else memcpy(&pvar->n1.n2.n3, Pos, type_size); @@ -540,11 +558,9 @@ switch (header->vt) { case VT_BSTR: - V_BSTR(pvar) = NULL; Pos = BSTR_UserUnmarshal(pFlags, Pos, &V_BSTR(pvar)); break; case VT_BSTR | VT_BYREF: - *V_BSTRREF(pvar) = NULL; Pos = BSTR_UserUnmarshal(pFlags, Pos, V_BSTRREF(pvar)); break; case VT_VARIANT | VT_BYREF: @@ -947,6 +963,7 @@ if (!ptr) { + SafeArrayDestroy(*ppsa); *ppsa = NULL; TRACE("NULL safe array unmarshaled\n"); @@ -983,13 +1000,34 @@ wiresab = (SAFEARRAYBOUND *)Buffer; Buffer += sizeof(wiresab[0]) * wiresa->cDims; - if(vt) - { + if(*ppsa && (*ppsa)->cDims==wiresa->cDims) + { + if(((*ppsa)->fFeatures & ~FADF_AUTOSETFLAGS) != (wiresa->fFeatures & ~FADF_AUTOSETFLAGS)) + RpcRaiseException(DISP_E_BADCALLEE); + + if(SAFEARRAY_GetCellCount(*ppsa)*(*ppsa)->cbElements != cell_count*elem_mem_size(wiresa, sftype)) + { + if((*ppsa)->fFeatures & (FADF_AUTO|FADF_STATIC|FADF_EMBEDDED|FADF_FIXEDSIZE)) + RpcRaiseException(DISP_E_BADCALLEE); + + hr = SafeArrayDestroyData(*ppsa); + if(FAILED(hr)) + RpcRaiseException(hr); + } + memcpy((*ppsa)->rgsabound, wiresab, sizeof(*wiresab)*wiresa->cDims); + + if((*ppsa)->fFeatures & FADF_HAVEVARTYPE) + ((DWORD*)(*ppsa))[-1] = vt; + } + else if(vt) + { + SafeArrayDestroy(*ppsa); *ppsa = SafeArrayCreateEx(vt, wiresa->cDims, wiresab, NULL); if (!*ppsa) RpcRaiseException(E_OUTOFMEMORY); } else { + SafeArrayDestroy(*ppsa); if (FAILED(SafeArrayAllocDescriptor(wiresa->cDims, ppsa))) RpcRaiseException(E_OUTOFMEMORY); memcpy((*ppsa)->rgsabound, wiresab, sizeof(SAFEARRAYBOUND) * wiresa->cDims); @@ -1001,11 +1039,10 @@ (*ppsa)->fFeatures |= (wiresa->fFeatures & ~(FADF_AUTOSETFLAGS)); /* FIXME: there should be a limit on how large wiresa->cbElements can be */ (*ppsa)->cbElements = elem_mem_size(wiresa, sftype); - (*ppsa)->cLocks = 0; /* SafeArrayCreateEx allocates the data for us, but * SafeArrayAllocDescriptor doesn't */ - if(!vt) + if(!(*ppsa)->pvData) { hr = SafeArrayAllocData(*ppsa); if (FAILED(hr)) @@ -1075,6 +1112,7 @@ TRACE("("); dump_user_flags(pFlags); TRACE(", &%p\n", *ppsa); SafeArrayDestroy(*ppsa); + *ppsa = NULL; } Modified: trunk/reactos/dll/win32/oleaut32/varformat.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/oleaut32/varform…
============================================================================== --- trunk/reactos/dll/win32/oleaut32/varformat.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/oleaut32/varformat.c [iso-8859-1] Fri Mar 4 09:33:34 2016 @@ -38,15 +38,6 @@ static const WCHAR szPercent_d[] = { '%','d','\0' }; static const WCHAR szPercentZeroTwo_d[] = { '%','0','2','d','\0' }; static const WCHAR szPercentZeroStar_d[] = { '%','0','*','d','\0' }; - -#if 0 -#define dump_tokens(rgb) do { \ - int i_; TRACE("Tokens->{\n"); \ - for (i_ = 0; i_ < rgb[0]; i_++) \ - TRACE("%s0x%02x", i_?",":"",rgb[i_]); \ - TRACE(" }\n"); \ - } while(0) -#endif /****************************************************************************** * Variant-Formats {OLEAUT32} @@ -1200,13 +1191,13 @@ else { /* Get a number string from pVarIn, and parse it */ - hRes = VariantChangeTypeEx(&vString, pVarIn, LCID_US, VARIANT_NOUSEROVERRIDE, VT_BSTR); + hRes = VariantChangeTypeEx(&vString, pVarIn, lcid, VARIANT_NOUSEROVERRIDE, VT_BSTR); if (FAILED(hRes)) return hRes; np.cDig = sizeof(rgbDig); np.dwInFlags = NUMPRS_STD; - hRes = VarParseNumFromStr(V_BSTR(&vString), LCID_US, 0, &np, rgbDig); + hRes = VarParseNumFromStr(V_BSTR(&vString), lcid, 0, &np, rgbDig); if (FAILED(hRes)) return hRes; @@ -1609,7 +1600,7 @@ { USHORT usFlags = dwFlags & VARIANT_CALENDAR_HIJRI ? VAR_CALENDAR_HIJRI : 0; - hRes = VariantChangeTypeEx(&vDate, pVarIn, LCID_US, usFlags, VT_DATE); + hRes = VariantChangeTypeEx(&vDate, pVarIn, lcid, usFlags, VT_DATE); if (FAILED(hRes)) return hRes; dateHeader = (FMT_DATE_HEADER*)(rgbTok + FmtGetPositive(header)); @@ -1948,7 +1939,7 @@ } else { - hRes = VariantChangeTypeEx(&vStr, pVarIn, LCID_US, VARIANT_NOUSEROVERRIDE, VT_BSTR); + hRes = VariantChangeTypeEx(&vStr, pVarIn, lcid, VARIANT_NOUSEROVERRIDE, VT_BSTR); if (FAILED(hRes)) return hRes; Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Fri Mar 4 09:33:34 2016 @@ -144,7 +144,7 @@ reactos/dll/win32/odbccp32 # Synced to WineStaging-1.7.55 reactos/dll/win32/ole32 # Synced to WineStaging-1.9.4 reactos/dll/win32/oleacc # Synced to WineStaging-1.7.55 -reactos/dll/win32/oleaut32 # Synced to WineStaging-1.7.55 +reactos/dll/win32/oleaut32 # Synced to WineStaging-1.9.4 reactos/dll/win32/olecli32 # Synced to WineStaging-1.7.55 reactos/dll/win32/oledlg # Synced to WineStaging-1.7.55 reactos/dll/win32/olepro32 # Synced to WineStaging-1.7.55
9 years, 1 month
1
0
0
0
[akhaldi] 70901: [OLE32] Sync with Wine Staging 1.9.4. CORE-10912
by akhaldi@svn.reactos.org
Author: akhaldi Date: Fri Mar 4 09:25:52 2016 New Revision: 70901 URL:
http://svn.reactos.org/svn/reactos?rev=70901&view=rev
Log: [OLE32] Sync with Wine Staging 1.9.4. CORE-10912 Modified: trunk/reactos/dll/win32/ole32/clipboard.c trunk/reactos/dll/win32/ole32/comcat.c trunk/reactos/dll/win32/ole32/compobj.c trunk/reactos/dll/win32/ole32/defaulthandler.c trunk/reactos/dll/win32/ole32/hglobalstream.c trunk/reactos/dll/win32/ole32/ifs.c trunk/reactos/dll/win32/ole32/ole2.c trunk/reactos/dll/win32/ole32/storage32.c trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/win32/ole32/clipboard.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/clipboard.…
============================================================================== --- trunk/reactos/dll/win32/ole32/clipboard.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/ole32/clipboard.c [iso-8859-1] Fri Mar 4 09:25:52 2016 @@ -154,6 +154,15 @@ * The one and only ole_clipbrd object which is created by OLEClipbrd_Initialize() */ static ole_clipbrd* theOleClipboard; + +static CRITICAL_SECTION latest_snapshot_cs; +static CRITICAL_SECTION_DEBUG latest_snapshot_cs_debug = +{ + 0, 0, &latest_snapshot_cs, + { &latest_snapshot_cs_debug.ProcessLocksList, &latest_snapshot_cs_debug.ProcessLocksList }, + 0, 0, { (DWORD_PTR)(__FILE__ ": clipboard last snapshot") } +}; +static CRITICAL_SECTION latest_snapshot_cs = { &latest_snapshot_cs_debug, -1, 0, 0, 0, 0 }; static inline HRESULT get_ole_clipbrd(ole_clipbrd **clipbrd) { @@ -1023,13 +1032,17 @@ if (ref == 0) { - ole_clipbrd *clipbrd; - HRESULT hr = get_ole_clipbrd(&clipbrd); + EnterCriticalSection(&latest_snapshot_cs); + if (This->ref) + { + LeaveCriticalSection(&latest_snapshot_cs); + return ref; + } + if (theOleClipboard->latest_snapshot == This) + theOleClipboard->latest_snapshot = NULL; + LeaveCriticalSection(&latest_snapshot_cs); if(This->data) IDataObject_Release(This->data); - - if(SUCCEEDED(hr) && clipbrd->latest_snapshot == This) - clipbrd->latest_snapshot = NULL; HeapFree(GetProcessHeap(), 0, This); } @@ -2169,21 +2182,28 @@ TRACE("(%p)\n", obj); if(!obj) return E_INVALIDARG; + *obj = NULL; if(FAILED(hr = get_ole_clipbrd(&clipbrd))) return hr; seq_no = GetClipboardSequenceNumber(); + EnterCriticalSection(&latest_snapshot_cs); if(clipbrd->latest_snapshot && clipbrd->latest_snapshot->seq_no != seq_no) clipbrd->latest_snapshot = NULL; if(!clipbrd->latest_snapshot) { clipbrd->latest_snapshot = snapshot_construct(seq_no); - if(!clipbrd->latest_snapshot) return E_OUTOFMEMORY; + if(!clipbrd->latest_snapshot) + { + LeaveCriticalSection(&latest_snapshot_cs); + return E_OUTOFMEMORY; + } } *obj = &clipbrd->latest_snapshot->IDataObject_iface; IDataObject_AddRef(*obj); + LeaveCriticalSection(&latest_snapshot_cs); return S_OK; } Modified: trunk/reactos/dll/win32/ole32/comcat.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/comcat.c?r…
============================================================================== --- trunk/reactos/dll/win32/ole32/comcat.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/ole32/comcat.c [iso-8859-1] Fri Mar 4 09:25:52 2016 @@ -229,7 +229,11 @@ if (res != ERROR_SUCCESS) return S_FALSE; for (string = impl_strings; *string; string += CHARS_IN_GUID) { HKEY catkey; +#ifdef __REACTOS__ res = open_classes_key(subkey, string, READ_CONTROL, &catkey); +#else + res = open_classes_key(subkey, string, 0, &catkey); +#endif if (res != ERROR_SUCCESS) { RegCloseKey(subkey); return S_FALSE; Modified: trunk/reactos/dll/win32/ole32/compobj.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/compobj.c?…
============================================================================== --- trunk/reactos/dll/win32/ole32/compobj.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/ole32/compobj.c [iso-8859-1] Fri Mar 4 09:25:52 2016 @@ -308,7 +308,8 @@ static const WCHAR classes_rootW[] = L"\\REGISTRY\\Machine\\Software\\Classes"; #else static const WCHAR classes_rootW[] = - {'M','a','c','h','i','n','e','\\','S','o','f','t','w','a','r','e','\\','C','l','a','s','s','e','s',0}; + {'\\','R','e','g','i','s','t','r','y','\\','M','a','c','h','i','n','e', + '\\','S','o','f','t','w','a','r','e','\\','C','l','a','s','s','e','s',0}; #endif static HKEY classes_root_hkey; @@ -443,8 +444,7 @@ BOOL multi_threaded; }; -static const WCHAR wszAptWinClass[] = {'O','l','e','M','a','i','n','T','h','r','e','a','d','W','n','d','C','l','a','s','s',' ', - '0','x','#','#','#','#','#','#','#','#',' ',0}; +static const WCHAR wszAptWinClass[] = {'O','l','e','M','a','i','n','T','h','r','e','a','d','W','n','d','C','l','a','s','s',0}; /***************************************************************************** * This section contains OpenDllList implementation @@ -1950,6 +1950,8 @@ if (!--info->inits) { + if (info->ole_inits) + WARN("uninitializing apartment while Ole is still initialized\n"); apartment_release(info->apt); info->apt = NULL; } @@ -5005,6 +5007,35 @@ } /*********************************************************************** + * CoGetApartmentType [OLE32.@] + */ +HRESULT WINAPI CoGetApartmentType(APTTYPE *type, APTTYPEQUALIFIER *qualifier) +{ + struct oletls *info = COM_CurrentInfo(); + + FIXME("(%p %p): semi-stub\n", type, qualifier); + + if (!type || !qualifier) + return E_INVALIDARG; + + if (!info) + return E_OUTOFMEMORY; + + if (!info->apt) + *type = APTTYPE_CURRENT; + else if (info->apt->multi_threaded) + *type = APTTYPE_MTA; + else if (info->apt->main) + *type = APTTYPE_MAINSTA; + else + *type = APTTYPE_STA; + + *qualifier = APTTYPEQUALIFIER_NONE; + + return info->apt ? ERROR_SUCCESS : CO_E_NOTINITIALIZED; +} + +/*********************************************************************** * DllMain (OLE32.@) */ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID reserved) Modified: trunk/reactos/dll/win32/ole32/defaulthandler.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/defaulthan…
============================================================================== --- trunk/reactos/dll/win32/ole32/defaulthandler.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/ole32/defaulthandler.c [iso-8859-1] Fri Mar 4 09:25:52 2016 @@ -239,7 +239,7 @@ /* Check that we obtained an interface. */ if (*ppvObject == NULL) { - WARN( "() : asking for un supported interface %s\n", debugstr_guid(riid)); + WARN( "() : asking for unsupported interface %s\n", debugstr_guid(riid)); return E_NOINTERFACE; } Modified: trunk/reactos/dll/win32/ole32/hglobalstream.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/hglobalstr…
============================================================================== --- trunk/reactos/dll/win32/ole32/hglobalstream.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/ole32/hglobalstream.c [iso-8859-1] Fri Mar 4 09:25:52 2016 @@ -5,6 +5,7 @@ * for streams contained supported by an HGLOBAL pointer. * * Copyright 1999 Francis Beaudet + * Copyright 2016 Dmitry Timoshkov * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -23,7 +24,158 @@ #include "precomp.h" -WINE_DEFAULT_DEBUG_CHANNEL(storage); +WINE_DEFAULT_DEBUG_CHANNEL(hglobalstream); + +struct handle_wrapper +{ + LONG ref; + HGLOBAL hglobal; + ULONG size; + BOOL delete_on_release; + CRITICAL_SECTION lock; +}; + +static void handle_addref(struct handle_wrapper *handle) +{ + InterlockedIncrement(&handle->ref); +} + +static void handle_release(struct handle_wrapper *handle) +{ + ULONG ref = InterlockedDecrement(&handle->ref); + + if (!ref) + { + if (handle->delete_on_release) + { + GlobalFree(handle->hglobal); + handle->hglobal = NULL; + } + + handle->lock.DebugInfo->Spare[0] = 0; + DeleteCriticalSection(&handle->lock); + HeapFree(GetProcessHeap(), 0, handle); + } +} + +static ULONG handle_read(struct handle_wrapper *handle, ULONG *pos, void *dest, ULONG len) +{ + void *source; + + EnterCriticalSection(&handle->lock); + + if (*pos < handle->size) + len = min(handle->size - *pos, len); + else + len = 0; + + source = GlobalLock(handle->hglobal); + if (source) + { + memcpy(dest, (char *)source + *pos, len); + *pos += len; + GlobalUnlock(handle->hglobal); + } + else + { + WARN("read from invalid hglobal %p\n", handle->hglobal); + len = 0; + } + + LeaveCriticalSection(&handle->lock); + return len; +} + +static ULONG handle_write(struct handle_wrapper *handle, ULONG *pos, const void *source, ULONG len) +{ + void *dest; + + if (!len) + return 0; + + EnterCriticalSection(&handle->lock); + + if (*pos + len > handle->size) + { + HGLOBAL hglobal = GlobalReAlloc(handle->hglobal, *pos + len, GMEM_MOVEABLE); + if (hglobal) + { + handle->hglobal = hglobal; + handle->size = *pos + len; + } + else + { + len = 0; + goto done; + } + } + + dest = GlobalLock(handle->hglobal); + if (dest) + { + memcpy((char *)dest + *pos, source, len); + *pos += len; + GlobalUnlock(handle->hglobal); + } + else + { + WARN("write to invalid hglobal %p\n", handle->hglobal); + /* len = 0; */ + } + +done: + LeaveCriticalSection(&handle->lock); + return len; +} + +static HGLOBAL handle_gethglobal(struct handle_wrapper *handle) +{ + return handle->hglobal; +} + +static HRESULT handle_setsize(struct handle_wrapper *handle, ULONG size) +{ + HRESULT hr = S_OK; + + EnterCriticalSection(&handle->lock); + + if (handle->size != size) + { + HGLOBAL hglobal = GlobalReAlloc(handle->hglobal, size, GMEM_MOVEABLE); + if (hglobal) + { + handle->hglobal = hglobal; + handle->size = size; + } + else + hr = E_OUTOFMEMORY; + } + + LeaveCriticalSection(&handle->lock); + return hr; +} + +static ULONG handle_getsize(struct handle_wrapper *handle) +{ + return handle->size; +} + +static struct handle_wrapper *handle_create(HGLOBAL hglobal, BOOL delete_on_release) +{ + struct handle_wrapper *handle; + + handle = HeapAlloc(GetProcessHeap(), 0, sizeof(*handle)); + if (handle) + { + handle->ref = 1; + handle->hglobal = hglobal; + handle->size = GlobalSize(hglobal); + handle->delete_on_release = delete_on_release; + InitializeCriticalSection(&handle->lock); + handle->lock.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": handle_wrapper.lock"); + } + return handle; +} /**************************************************************************** * HGLOBALStreamImpl definition. @@ -36,14 +188,7 @@ IStream IStream_iface; LONG ref; - /* support for the stream */ - HGLOBAL supportHandle; - - /* if TRUE the HGLOBAL is destroyed when the stream is finally released */ - BOOL deleteOnRelease; - - /* size of the stream */ - ULARGE_INTEGER streamSize; + struct handle_wrapper *handle; /* current position of the cursor */ ULARGE_INTEGER currentPosition; @@ -95,12 +240,7 @@ if (!ref) { - if (This->deleteOnRelease) - { - GlobalFree(This->supportHandle); - This->supportHandle = NULL; - } - + handle_release(This->handle); HeapFree(GetProcessHeap(), 0, This); } @@ -123,59 +263,12 @@ ULONG* pcbRead) /* [out] */ { HGLOBALStreamImpl* This = impl_from_IStream(iface); - - void* supportBuffer; - ULONG bytesReadBuffer; - ULONG bytesToReadFromBuffer; - - TRACE("(%p, %p, %d, %p)\n", iface, - pv, cb, pcbRead); - - /* - * If the caller is not interested in the number of bytes read, - * we use another buffer to avoid "if" statements in the code. - */ - if (pcbRead==0) - pcbRead = &bytesReadBuffer; - - /* - * Using the known size of the stream, calculate the number of bytes - * to read from the block chain - */ - bytesToReadFromBuffer = min( This->streamSize.u.LowPart - This->currentPosition.u.LowPart, cb); - - /* - * Lock the buffer in position and copy the data. - */ - supportBuffer = GlobalLock(This->supportHandle); - if (!supportBuffer) - { - WARN("read from invalid hglobal %p\n", This->supportHandle); - *pcbRead = 0; - return S_OK; - } - - memcpy(pv, (char *) supportBuffer+This->currentPosition.u.LowPart, bytesToReadFromBuffer); - - /* - * Move the current position to the new position - */ - This->currentPosition.u.LowPart+=bytesToReadFromBuffer; - - /* - * Return the number of bytes read. - */ - *pcbRead = bytesToReadFromBuffer; - - /* - * Cleanup - */ - GlobalUnlock(This->supportHandle); - - /* - * Always returns S_OK even if the end of the stream is reached before the - * buffer is filled - */ + ULONG num_bytes; + + TRACE("(%p, %p, %d, %p)\n", iface, pv, cb, pcbRead); + + num_bytes = handle_read(This->handle, &This->currentPosition.u.LowPart, pv, cb); + if (pcbRead) *pcbRead = num_bytes; return S_OK; } @@ -197,71 +290,14 @@ ULONG* pcbWritten) /* [out] */ { HGLOBALStreamImpl* This = impl_from_IStream(iface); - - void* supportBuffer; - ULARGE_INTEGER newSize; - ULONG bytesWritten = 0; + ULONG num_bytes; TRACE("(%p, %p, %d, %p)\n", iface, pv, cb, pcbWritten); - /* - * If the caller is not interested in the number of bytes written, - * we use another buffer to avoid "if" statements in the code. - */ - if (pcbWritten == 0) - pcbWritten = &bytesWritten; - - if (cb == 0) - goto out; - - *pcbWritten = 0; - - newSize.u.HighPart = 0; - newSize.u.LowPart = This->currentPosition.u.LowPart + cb; - - /* - * Verify if we need to grow the stream - */ - if (newSize.u.LowPart > This->streamSize.u.LowPart) - { - /* grow stream */ - HRESULT hr = IStream_SetSize(iface, newSize); - if (FAILED(hr)) - { - ERR("IStream_SetSize failed with error 0x%08x\n", hr); - return hr; - } - } - - /* - * Lock the buffer in position and copy the data. - */ - supportBuffer = GlobalLock(This->supportHandle); - if (!supportBuffer) - { - WARN("write to invalid hglobal %p\n", This->supportHandle); - return S_OK; - } - - memcpy((char *) supportBuffer+This->currentPosition.u.LowPart, pv, cb); - - /* - * Move the current position to the new position - */ - This->currentPosition.u.LowPart+=cb; - - /* - * Cleanup - */ - GlobalUnlock(This->supportHandle); - -out: - /* - * Return the number of bytes read. - */ - *pcbWritten = cb; - - return S_OK; + num_bytes = handle_write(This->handle, &This->currentPosition.u.LowPart, pv, cb); + if (pcbWritten) *pcbWritten = num_bytes; + + return (num_bytes < cb) ? E_OUTOFMEMORY : S_OK; } /*** @@ -299,7 +335,7 @@ case STREAM_SEEK_CUR: break; case STREAM_SEEK_END: - newPosition = This->streamSize; + newPosition.QuadPart = handle_getsize(This->handle); break; default: hr = STG_E_SEEKERROR; @@ -344,29 +380,13 @@ ULARGE_INTEGER libNewSize) /* [in] */ { HGLOBALStreamImpl* This = impl_from_IStream(iface); - HGLOBAL supportHandle; TRACE("(%p, %d)\n", iface, libNewSize.u.LowPart); /* * HighPart is ignored as shown in tests */ - - if (This->streamSize.u.LowPart == libNewSize.u.LowPart) - return S_OK; - - /* - * Re allocate the HGlobal to fit the new size of the stream. - */ - supportHandle = GlobalReAlloc(This->supportHandle, libNewSize.u.LowPart, 0); - - if (supportHandle == 0) - return E_OUTOFMEMORY; - - This->supportHandle = supportHandle; - This->streamSize.u.LowPart = libNewSize.u.LowPart; - - return S_OK; + return handle_setsize(This->handle, libNewSize.u.LowPart); } /*** @@ -514,9 +534,24 @@ pstatstg->pwcsName = NULL; pstatstg->type = STGTY_STREAM; - pstatstg->cbSize = This->streamSize; - - return S_OK; + pstatstg->cbSize.QuadPart = handle_getsize(This->handle); + + return S_OK; +} + +static const IStreamVtbl HGLOBALStreamImplVtbl; + +static HGLOBALStreamImpl *HGLOBALStreamImpl_Create(void) +{ + HGLOBALStreamImpl *This; + + This = HeapAlloc(GetProcessHeap(), 0, sizeof(*This)); + if (This) + { + This->IStream_iface.lpVtbl = &HGLOBALStreamImplVtbl; + This->ref = 1; + } + return This; } static HRESULT WINAPI HGLOBALStreamImpl_Clone( @@ -524,14 +559,24 @@ IStream** ppstm) /* [out] */ { HGLOBALStreamImpl* This = impl_from_IStream(iface); + HGLOBALStreamImpl* clone; ULARGE_INTEGER dummy; LARGE_INTEGER offset; - HRESULT hr; - - TRACE(" Cloning %p (deleteOnRelease=%d seek position=%ld)\n",iface,This->deleteOnRelease,(long)This->currentPosition.QuadPart); - hr = CreateStreamOnHGlobal(This->supportHandle, FALSE, ppstm); - if(FAILED(hr)) - return hr; + + if (!ppstm) return E_INVALIDARG; + + *ppstm = NULL; + + TRACE(" Cloning %p (seek position=%d)\n", iface, This->currentPosition.u.LowPart); + + clone = HGLOBALStreamImpl_Create(); + if (!clone) return E_OUTOFMEMORY; + + *ppstm = &clone->IStream_iface; + + handle_addref(This->handle); + clone->handle = This->handle; + offset.QuadPart = (LONGLONG)This->currentPosition.QuadPart; IStream_Seek(*ppstm, offset, STREAM_SEEK_SET, &dummy); return S_OK; @@ -568,28 +613,19 @@ if (!ppstm) return E_INVALIDARG; - This = HeapAlloc(GetProcessHeap(), 0, sizeof(HGLOBALStreamImpl)); + This = HGLOBALStreamImpl_Create(); if (!This) return E_OUTOFMEMORY; - This->IStream_iface.lpVtbl = &HGLOBALStreamImplVtbl; - This->ref = 1; - - /* initialize the support */ - This->supportHandle = hGlobal; - This->deleteOnRelease = fDeleteOnRelease; - /* allocate a handle if one is not supplied */ - if (!This->supportHandle) - This->supportHandle = GlobalAlloc(GMEM_MOVEABLE|GMEM_NODISCARD|GMEM_SHARE, 0); + if (!hGlobal) + hGlobal = GlobalAlloc(GMEM_MOVEABLE|GMEM_NODISCARD|GMEM_SHARE, 0); + + This->handle = handle_create(hGlobal, fDeleteOnRelease); /* start at the beginning */ This->currentPosition.u.HighPart = 0; This->currentPosition.u.LowPart = 0; - /* initialize the size of the stream to the size of the handle */ - This->streamSize.u.HighPart = 0; - This->streamSize.u.LowPart = GlobalSize(This->supportHandle); - *ppstm = &This->IStream_iface; return S_OK; @@ -602,16 +638,16 @@ { HGLOBALStreamImpl* pStream; - if (pstm == NULL) + if (!pstm || !phglobal) return E_INVALIDARG; - pStream = (HGLOBALStreamImpl*) pstm; + pStream = impl_from_IStream(pstm); /* * Verify that the stream object was created with CreateStreamOnHGlobal. */ if (pStream->IStream_iface.lpVtbl == &HGLOBALStreamImplVtbl) - *phglobal = pStream->supportHandle; + *phglobal = handle_gethglobal(pStream->handle); else { *phglobal = 0; Modified: trunk/reactos/dll/win32/ole32/ifs.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/ifs.c?rev=…
============================================================================== --- trunk/reactos/dll/win32/ole32/ifs.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/ole32/ifs.c [iso-8859-1] Fri Mar 4 09:25:52 2016 @@ -127,8 +127,8 @@ /****************************************************************************** * IMalloc32_QueryInterface [VTABLE] */ -static HRESULT WINAPI IMalloc_fnQueryInterface(LPMALLOC iface,REFIID refiid,LPVOID *obj) { - +static HRESULT WINAPI IMalloc_fnQueryInterface(IMalloc *iface, REFIID refiid, void **obj) +{ TRACE("(%s,%p)\n",debugstr_guid(refiid),obj); if (IsEqualIID(&IID_IUnknown,refiid) || IsEqualIID(&IID_IMalloc,refiid)) { @@ -141,21 +141,22 @@ /****************************************************************************** * IMalloc32_AddRefRelease [VTABLE] */ -static ULONG WINAPI IMalloc_fnAddRefRelease (LPMALLOC iface) { +static ULONG WINAPI IMalloc_fnAddRefRelease(IMalloc *iface) +{ return 1; } /****************************************************************************** * IMalloc32_Alloc [VTABLE] */ -static LPVOID WINAPI IMalloc_fnAlloc(LPMALLOC iface, SIZE_T cb) { - - LPVOID addr; - - TRACE("(%d)\n",cb); - - if(Malloc32.pSpy) { - DWORD preAllocResult; +static void * WINAPI IMalloc_fnAlloc(IMalloc *iface, SIZE_T cb) +{ + void *addr; + + TRACE("(%ld)\n",cb); + + if(Malloc32.pSpy) { + SIZE_T preAllocResult; EnterCriticalSection(&IMalloc32_SpyCS); preAllocResult = IMallocSpy_PreAlloc(Malloc32.pSpy, cb); @@ -182,14 +183,14 @@ /****************************************************************************** * IMalloc32_Realloc [VTABLE] */ -static LPVOID WINAPI IMalloc_fnRealloc(LPMALLOC iface,LPVOID pv,SIZE_T cb) { - - LPVOID pNewMemory; - - TRACE("(%p,%d)\n",pv,cb); - - if(Malloc32.pSpy) { - LPVOID pRealMemory; +static void * WINAPI IMalloc_fnRealloc(IMalloc *iface, void *pv, SIZE_T cb) +{ + void *pNewMemory; + + TRACE("(%p,%ld)\n",pv,cb); + + if(Malloc32.pSpy) { + void *pRealMemory; BOOL fSpyed; EnterCriticalSection(&IMalloc32_SpyCS); @@ -234,8 +235,8 @@ /****************************************************************************** * IMalloc32_Free [VTABLE] */ -static VOID WINAPI IMalloc_fnFree(LPMALLOC iface,LPVOID pv) { - +static void WINAPI IMalloc_fnFree(IMalloc *iface, void *pv) +{ BOOL fSpyed = FALSE; TRACE("(%p)\n",pv); @@ -270,9 +271,9 @@ * win95: size allocated (4 byte boundarys) * win2k: size originally requested !!! (allocated on 8 byte boundarys) */ -static SIZE_T WINAPI IMalloc_fnGetSize(LPMALLOC iface,LPVOID pv) { - - DWORD cb; +static SIZE_T WINAPI IMalloc_fnGetSize(IMalloc *iface, void *pv) +{ + SIZE_T cb; BOOL fSpyed = FALSE; TRACE("(%p)\n",pv); @@ -295,8 +296,8 @@ /****************************************************************************** * IMalloc32_DidAlloc [VTABLE] */ -static INT WINAPI IMalloc_fnDidAlloc(LPMALLOC iface,LPVOID pv) { - +static INT WINAPI IMalloc_fnDidAlloc(IMalloc *iface, void *pv) +{ BOOL fSpyed = FALSE; int didAlloc; @@ -319,7 +320,8 @@ /****************************************************************************** * IMalloc32_HeapMinimize [VTABLE] */ -static VOID WINAPI IMalloc_fnHeapMinimize(LPMALLOC iface) { +static void WINAPI IMalloc_fnHeapMinimize(IMalloc *iface) +{ TRACE("()\n"); if(Malloc32.pSpy) { @@ -352,17 +354,22 @@ * Retrieves the current IMalloc interface for the process. * * PARAMS - * dwMemContext [I] - * lpMalloc [O] Address where memory allocator object will be stored. + * context [I] Should always be MEMCTX_TASK. + * imalloc [O] Address where memory allocator object will be stored. * * RETURNS * Success: S_OK. * Failure: HRESULT code. */ -HRESULT WINAPI CoGetMalloc(DWORD dwMemContext, LPMALLOC *lpMalloc) -{ - *lpMalloc = &Malloc32.IMalloc_iface; - return S_OK; +HRESULT WINAPI CoGetMalloc(DWORD context, IMalloc **imalloc) +{ + if (context != MEMCTX_TASK) { + *imalloc = NULL; + return E_INVALIDARG; + } + + *imalloc = &Malloc32.IMalloc_iface; + return S_OK; } /*********************************************************************** Modified: trunk/reactos/dll/win32/ole32/ole2.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/ole2.c?rev…
============================================================================== --- trunk/reactos/dll/win32/ole32/ole2.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/ole32/ole2.c [iso-8859-1] Fri Mar 4 09:25:52 2016 @@ -94,11 +94,6 @@ /* property to store Marshalled IDropTarget pointer */ static const WCHAR prop_marshalleddroptarget[] = {'W','i','n','e','M','a','r','s','h','a','l','l','e','d','D','r','o','p','T','a','r','g','e','t',0}; - -static const WCHAR clsidfmtW[] = - {'C','L','S','I','D','\\','{','%','0','8','x','-','%','0','4','x','-','%','0','4','x','-', - '%','0','2','x','%','0','2','x','-','%','0','2','x','%','0','2','x','%','0','2','x','%','0','2','x', - '%','0','2','x','%','0','2','x','}','\\',0}; static const WCHAR emptyW[] = { 0 }; @@ -166,6 +161,8 @@ if (!COM_CurrentInfo()->ole_inits) hr = S_OK; + else + hr = S_FALSE; /* * Then, it has to initialize the OLE specific modules. @@ -209,6 +206,11 @@ { TRACE("()\n"); + if (COM_CurrentInfo()->ole_inits == 0) + { + WARN("ole_inits is already 0\n"); + return ; + } /* * If we hit the bottom of the lock stack, free the libraries. */ @@ -641,88 +643,73 @@ /*********************************************************************** * OleRegGetUserType (OLE32.@) - * - * This implementation of OleRegGetUserType ignores the dwFormOfType - * parameter and always returns the full name of the object. This is - * not too bad since this is the case for many objects because of the - * way they are registered. - */ -HRESULT WINAPI OleRegGetUserType( - REFCLSID clsid, - DWORD dwFormOfType, - LPOLESTR* pszUserType) -{ - WCHAR keyName[60]; - DWORD dwKeyType; - DWORD cbData; - HKEY clsidKey; - LONG hres; - - /* - * Initialize the out parameter. - */ - *pszUserType = NULL; - - /* - * Build the key name we're looking for - */ - sprintfW( keyName, clsidfmtW, - clsid->Data1, clsid->Data2, clsid->Data3, - clsid->Data4[0], clsid->Data4[1], clsid->Data4[2], clsid->Data4[3], - clsid->Data4[4], clsid->Data4[5], clsid->Data4[6], clsid->Data4[7] ); - - TRACE("(%s, %d, %p)\n", debugstr_w(keyName), dwFormOfType, pszUserType); - - /* - * Open the class id Key - */ - hres = open_classes_key(HKEY_CLASSES_ROOT, keyName, MAXIMUM_ALLOWED, &clsidKey); - if (hres != ERROR_SUCCESS) - return REGDB_E_CLASSNOTREG; - - /* - * Retrieve the size of the name string. - */ - cbData = 0; - - hres = RegQueryValueExW(clsidKey, + */ +HRESULT WINAPI OleRegGetUserType(REFCLSID clsid, DWORD form, LPOLESTR *usertype) +{ + static const WCHAR auxusertypeW[] = {'A','u','x','U','s','e','r','T','y','p','e','\\','%','d',0}; + DWORD valuetype, valuelen; + WCHAR auxkeynameW[16]; + HKEY usertypekey; + HRESULT hres; + LONG ret; + + TRACE("(%s, %u, %p)\n", debugstr_guid(clsid), form, usertype); + + if (!usertype) + return E_INVALIDARG; + + *usertype = NULL; + + /* Return immediately if it's not registered. */ + hres = COM_OpenKeyForCLSID(clsid, NULL, KEY_READ, &usertypekey); + if (FAILED(hres)) + return hres; + + valuelen = 0; + + /* Try additional types if requested. If they don't exist fall back to USERCLASSTYPE_FULL. */ + if (form != USERCLASSTYPE_FULL) + { + HKEY auxkey; + + sprintfW(auxkeynameW, auxusertypeW, form); + if (COM_OpenKeyForCLSID(clsid, auxkeynameW, KEY_READ, &auxkey) == S_OK) + { + if (!RegQueryValueExW(auxkey, emptyW, NULL, &valuetype, NULL, &valuelen) && valuelen) + { + RegCloseKey(usertypekey); + usertypekey = auxkey; + } + else + RegCloseKey(auxkey); + } + } + + valuelen = 0; + if (RegQueryValueExW(usertypekey, emptyW, NULL, &valuetype, NULL, &valuelen)) + { + RegCloseKey(usertypekey); + return REGDB_E_READREGDB; + } + + *usertype = CoTaskMemAlloc(valuelen); + if (!*usertype) + { + RegCloseKey(usertypekey); + return E_OUTOFMEMORY; + } + + ret = RegQueryValueExW(usertypekey, emptyW, NULL, - &dwKeyType, - NULL, - &cbData); - - if (hres!=ERROR_SUCCESS) - { - RegCloseKey(clsidKey); - return REGDB_E_READREGDB; - } - - /* - * Allocate a buffer for the registry value. - */ - *pszUserType = CoTaskMemAlloc(cbData); - - if (*pszUserType==NULL) - { - RegCloseKey(clsidKey); - return E_OUTOFMEMORY; - } - - hres = RegQueryValueExW(clsidKey, - emptyW, - NULL, - &dwKeyType, - (LPBYTE) *pszUserType, - &cbData); - - RegCloseKey(clsidKey); - - if (hres != ERROR_SUCCESS) - { - CoTaskMemFree(*pszUserType); - *pszUserType = NULL; - + &valuetype, + (LPBYTE)*usertype, + &valuelen); + RegCloseKey(usertypekey); + if (ret != ERROR_SUCCESS) + { + CoTaskMemFree(*usertype); + *usertype = NULL; return REGDB_E_READREGDB; } @@ -848,21 +835,13 @@ { static const WCHAR miscstatusW[] = {'M','i','s','c','S','t','a','t','u','s',0}; static const WCHAR dfmtW[] = {'%','d',0}; - WCHAR keyName[60]; - HKEY clsidKey; + WCHAR keyName[16]; HKEY miscStatusKey; HKEY aspectKey; LONG result; - - /* - * Build the key name we're looking for - */ - sprintfW( keyName, clsidfmtW, - clsid->Data1, clsid->Data2, clsid->Data3, - clsid->Data4[0], clsid->Data4[1], clsid->Data4[2], clsid->Data4[3], - clsid->Data4[4], clsid->Data4[5], clsid->Data4[6], clsid->Data4[7] ); - - TRACE("(%s, %d, %p)\n", debugstr_w(keyName), dwAspect, pdwStatus); + HRESULT hr; + + TRACE("(%s, %d, %p)\n", debugstr_guid(clsid), dwAspect, pdwStatus); if (!pdwStatus) return E_INVALIDARG; @@ -870,26 +849,11 @@ if (actctx_get_miscstatus(clsid, dwAspect, pdwStatus)) return S_OK; - /* - * Open the class id Key - */ - result = open_classes_key(HKEY_CLASSES_ROOT, keyName, MAXIMUM_ALLOWED, &clsidKey); - if (result != ERROR_SUCCESS) - return REGDB_E_CLASSNOTREG; - - /* - * Get the MiscStatus - */ - result = open_classes_key(clsidKey, miscstatusW, MAXIMUM_ALLOWED, &miscStatusKey); - if (result != ERROR_SUCCESS) - { - RegCloseKey(clsidKey); - return S_OK; - } - - /* - * Read the default value - */ + hr = COM_OpenKeyForCLSID(clsid, miscstatusW, KEY_READ, &miscStatusKey); + if (FAILED(hr)) + /* missing key is not a failure */ + return hr == REGDB_E_KEYMISSING ? S_OK : hr; + OLEUTL_ReadRegistryDWORDValue(miscStatusKey, pdwStatus); /* @@ -897,19 +861,14 @@ */ sprintfW(keyName, dfmtW, dwAspect); - result = open_classes_key(miscStatusKey, keyName, MAXIMUM_ALLOWED, &aspectKey); + result = open_classes_key(miscStatusKey, keyName, KEY_READ, &aspectKey); if (result == ERROR_SUCCESS) { OLEUTL_ReadRegistryDWORDValue(aspectKey, pdwStatus); RegCloseKey(aspectKey); } - /* - * Cleanup - */ RegCloseKey(miscStatusKey); - RegCloseKey(clsidKey); - return S_OK; } @@ -2567,7 +2526,7 @@ if (SUCCEEDED(hres)) { DWORD dwStatus; - hres = IOleObject_GetMiscStatus(pOleObject, DVASPECT_CONTENT, &dwStatus); + IOleObject_GetMiscStatus(pOleObject, DVASPECT_CONTENT, &dwStatus); } } @@ -2596,21 +2555,12 @@ if (((renderopt == OLERENDER_DRAW) || (renderopt == OLERENDER_FORMAT)) && SUCCEEDED(hres)) { - IRunnableObject *pRunnable; - IOleCache *pOleCache; - HRESULT hres2; - - hres2 = IUnknown_QueryInterface(pUnk, &IID_IRunnableObject, (void **)&pRunnable); - if (SUCCEEDED(hres2)) - { - hres = IRunnableObject_Run(pRunnable, NULL); - IRunnableObject_Release(pRunnable); - } - + hres = OleRun(pUnk); if (SUCCEEDED(hres)) { - hres2 = IUnknown_QueryInterface(pUnk, &IID_IOleCache, (void **)&pOleCache); - if (SUCCEEDED(hres2)) + IOleCache *pOleCache; + + if (SUCCEEDED(IUnknown_QueryInterface(pUnk, &IID_IOleCache, (void **)&pOleCache))) { DWORD dwConnection; if (renderopt == OLERENDER_DRAW && !pFormatEtc) { Modified: trunk/reactos/dll/win32/ole32/storage32.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/storage32.…
============================================================================== --- trunk/reactos/dll/win32/ole32/storage32.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/ole32/storage32.c [iso-8859-1] Fri Mar 4 09:25:52 2016 @@ -8882,7 +8882,7 @@ * Refuse to open the file if it's too small to be a structured storage file * FIXME: verify the file when reading instead of here */ - if (GetFileSize(hFile, NULL) < 0x100) + if (GetFileSize(hFile, NULL) < HEADER_SIZE) { CloseHandle(hFile); hr = STG_E_FILEALREADYEXISTS; Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Fri Mar 4 09:25:52 2016 @@ -142,7 +142,7 @@ reactos/dll/win32/objsel # Synced to WineStaging-1.7.55 reactos/dll/win32/odbc32 # Synced to WineStaging-1.9.4. Depends on port of Linux ODBC. reactos/dll/win32/odbccp32 # Synced to WineStaging-1.7.55 -reactos/dll/win32/ole32 # Synced to WineStaging-1.7.55 +reactos/dll/win32/ole32 # Synced to WineStaging-1.9.4 reactos/dll/win32/oleacc # Synced to WineStaging-1.7.55 reactos/dll/win32/oleaut32 # Synced to WineStaging-1.7.55 reactos/dll/win32/olecli32 # Synced to WineStaging-1.7.55
9 years, 1 month
1
0
0
0
[akhaldi] 70902: [OLE32_WINETEST] Sync with Wine Staging 1.9.4. CORE-10912
by akhaldi@svn.reactos.org
Author: akhaldi Date: Fri Mar 4 09:30:16 2016 New Revision: 70902 URL:
http://svn.reactos.org/svn/reactos?rev=70902&view=rev
Log: [OLE32_WINETEST] Sync with Wine Staging 1.9.4. CORE-10912 Modified: trunk/rostests/winetests/ole32/clipboard.c trunk/rostests/winetests/ole32/compobj.c trunk/rostests/winetests/ole32/hglobalstream.c trunk/rostests/winetests/ole32/ole2.c trunk/rostests/winetests/ole32/propvariant.c trunk/rostests/winetests/ole32/storage32.c Modified: trunk/rostests/winetests/ole32/clipboard.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/ole32/clipboard…
============================================================================== --- trunk/rostests/winetests/ole32/clipboard.c [iso-8859-1] (original) +++ trunk/rostests/winetests/ole32/clipboard.c [iso-8859-1] Fri Mar 4 09:30:16 2016 @@ -459,6 +459,17 @@ *lplpdataobj = (LPDATAOBJECT)obj; return S_OK; +} + +static void test_get_clipboard_unitialized(void) +{ + HRESULT hr; + IDataObject *pDObj; + + pDObj = (IDataObject *)0xdeadbeef; + hr = OleGetClipboard(&pDObj); + todo_wine ok(hr == S_OK, "OleGetClipboard() got 0x%08x instead of 0x%08x\n", hr, S_OK); + if (pDObj && pDObj != (IDataObject *)0xdeadbeef) IDataObject_Release(pDObj); } static void test_get_clipboard(void) @@ -1545,11 +1556,65 @@ } +static DWORD CALLBACK test_data_obj(void *arg) +{ + IDataObject *data_obj = arg; + + IDataObject_Release(data_obj); + return 0; +} + +static void test_multithreaded_clipboard(void) +{ + IDataObject *data_obj; + HANDLE thread; + HRESULT hr; + DWORD ret; + + OleInitialize(NULL); + + hr = OleGetClipboard(&data_obj); + ok(hr == S_OK, "OleGetClipboard returned %x\n", hr); + + thread = CreateThread(NULL, 0, test_data_obj, data_obj, 0, NULL); + ok(thread != NULL, "CreateThread failed (%d)\n", GetLastError()); + ret = WaitForSingleObject(thread, 5000); + ok(ret == WAIT_OBJECT_0, "WaitForSingleObject returned %x\n", ret); + + hr = OleGetClipboard(&data_obj); + ok(hr == S_OK, "OleGetClipboard returned %x\n", hr); + IDataObject_Release(data_obj); + + OleUninitialize(); +} + +static void test_get_clipboard_locked(void) +{ + HRESULT hr; + IDataObject *pDObj; + + OleInitialize(NULL); + + pDObj = (IDataObject *)0xdeadbeef; + /* lock clipboard */ + OpenClipboard(NULL); + hr = OleGetClipboard(&pDObj); + todo_wine ok(hr == CLIPBRD_E_CANT_OPEN, "OleGetClipboard() got 0x%08x instead of 0x%08x\n", hr, CLIPBRD_E_CANT_OPEN); + todo_wine ok(pDObj == NULL, "OleGetClipboard() got 0x%p instead of NULL\n",pDObj); + if (pDObj) IDataObject_Release(pDObj); + CloseClipboard(); + + OleUninitialize(); +} + START_TEST(clipboard) { + test_get_clipboard_unitialized(); test_set_clipboard(); test_consumer_refs(); test_flushed_getdata(); test_nonole_clipboard(); test_getdatahere(); -} + test_multithreaded_clipboard(); + test_get_clipboard_locked(); +} Modified: trunk/rostests/winetests/ole32/compobj.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/ole32/compobj.c…
============================================================================== --- trunk/rostests/winetests/ole32/compobj.c [iso-8859-1] (original) +++ trunk/rostests/winetests/ole32/compobj.c [iso-8859-1] Fri Mar 4 09:30:16 2016 @@ -79,6 +79,7 @@ static HRESULT (WINAPI * pCoGetTreatAsClass)(REFCLSID clsidOld, LPCLSID pClsidNew); static HRESULT (WINAPI * pCoTreatAsClass)(REFCLSID clsidOld, REFCLSID pClsidNew); static HRESULT (WINAPI * pCoGetContextToken)(ULONG_PTR *token); +static HRESULT (WINAPI * pCoGetApartmentType)(APTTYPE *type, APTTYPEQUALIFIER *qualifier); static LONG (WINAPI * pRegDeleteKeyExA)(HKEY, LPCSTR, REGSAM, DWORD); static LONG (WINAPI * pRegOverridePredefKey)(HKEY key, HKEY override); @@ -280,12 +281,12 @@ " progid=\"ProgId.ProgId\"" " miscStatusIcon=\"recomposeonresize\"" " />" -" <comClass clsid=\"{0be35203-8f91-11ce-9de3-00aa004bb851}\"" +" <comClass description=\"CustomFont Description\" clsid=\"{0be35203-8f91-11ce-9de3-00aa004bb851}\"" " progid=\"CustomFont\"" " miscStatusIcon=\"recomposeonresize\"" " miscStatusContent=\"insideout\"" " />" -" <comClass clsid=\"{0be35203-8f91-11ce-9de3-00aa004bb852}\"" +" <comClass description=\"StdFont Description\" clsid=\"{0be35203-8f91-11ce-9de3-00aa004bb852}\"" " progid=\"StdFont\"" " />" " <comClass clsid=\"{62222222-1234-1234-1234-56789abcdef0}\" >" @@ -2190,6 +2191,73 @@ OleUninitialize(); } +static void test_OleInitialize_InitCounting(void) +{ + HRESULT hr; + IUnknown *pUnk; + REFCLSID rclsid = &CLSID_InternetZoneManager; + + /* 1. OleInitialize fails but OleUnintialize is still called: apartment stays inited */ + hr = pCoInitializeEx(NULL, COINIT_MULTITHREADED); + ok(hr == S_OK, "CoInitializeEx(COINIT_MULTITHREADED) failed with error 0x%08x\n", hr); + + hr = OleInitialize(NULL); + ok(hr == RPC_E_CHANGED_MODE, "OleInitialize should have returned 0x%08x instead of 0x%08x\n", RPC_E_CHANGED_MODE, hr); + OleUninitialize(); + + pUnk = (IUnknown *)0xdeadbeef; + hr = CoCreateInstance(rclsid, NULL, 0x17, &IID_IUnknown, (void **)&pUnk); + ok(hr == S_OK, "CoCreateInstance should have returned 0x%08x instead of 0x%08x\n", S_OK, hr); + if (pUnk) IUnknown_Release(pUnk); + + CoUninitialize(); + + /* 2. Extra multiple OleUninitialize: apartment stays inited until CoUnitialize */ + hr = CoInitialize(NULL); + ok(hr == S_OK, "CoInitialize() failed with error 0x%08x\n", hr); + + hr = OleInitialize(NULL); + ok(hr == S_OK, "OleInitialize should have returned 0x%08x instead of 0x%08x\n", S_OK, hr); + OleUninitialize(); + OleUninitialize(); + OleUninitialize(); + + pUnk = (IUnknown *)0xdeadbeef; + hr = CoCreateInstance(rclsid, NULL, 0x17, &IID_IUnknown, (void **)&pUnk); + ok(hr == S_OK, "CoCreateInstance should have returned 0x%08x instead of 0x%08x\n", S_OK, hr); + if (pUnk) IUnknown_Release(pUnk); + + CoUninitialize(); + + pUnk = (IUnknown *)0xdeadbeef; + hr = CoCreateInstance(rclsid, NULL, 0x17, &IID_IUnknown, (void **)&pUnk); + ok(hr == CO_E_NOTINITIALIZED, "CoCreateInstance should have returned 0x%08x instead of 0x%08x\n", CO_E_NOTINITIALIZED, hr); + if (pUnk) IUnknown_Release(pUnk); + + /* 3. CoUninitialize does not formally deinit Ole */ + hr = CoInitialize(NULL); + ok(hr == S_OK, "CoInitialize() failed with error 0x%08x\n", hr); + + hr = OleInitialize(NULL); + ok(hr == S_OK, "OleInitialize should have returned 0x%08x instead of 0x%08x\n", S_OK, hr); + + CoUninitialize(); + CoUninitialize(); + + pUnk = (IUnknown *)0xdeadbeef; + hr = CoCreateInstance(rclsid, NULL, 0x17, &IID_IUnknown, (void **)&pUnk); + ok(hr == CO_E_NOTINITIALIZED, "CoCreateInstance should have returned 0x%08x instead of 0x%08x\n", CO_E_NOTINITIALIZED, hr); + /* COM is not initialized anymore */ + if (pUnk) IUnknown_Release(pUnk); + + hr = OleInitialize(NULL); + ok(hr == S_FALSE, "OleInitialize should have returned 0x%08x instead of 0x%08x\n", S_FALSE, hr); + /* ... but native OleInit returns S_FALSE as if Ole is considered initialized */ + + OleUninitialize(); + +} + static void test_OleRegGetMiscStatus(void) { ULONG_PTR cookie; @@ -2232,6 +2300,159 @@ pDeactivateActCtx(0, cookie); pReleaseActCtx(handle); } +} + +static void test_OleRegGetUserType(void) +{ + static const WCHAR stdfont_usertypeW[] = {'S','t','a','n','d','a','r','d',' ','F','o','n','t',0}; + static const WCHAR stdfont2_usertypeW[] = {'C','L','S','I','D','_','S','t','d','F','o','n','t',0}; + static const WCHAR clsidkeyW[] = {'C','L','S','I','D',0}; + static const WCHAR defvalueW[] = {'D','e','f','a','u','l','t',' ','N','a','m','e',0}; + static const WCHAR auxvalue0W[] = {'A','u','x',' ','N','a','m','e',' ','0',0}; + static const WCHAR auxvalue2W[] = {'A','u','x',' ','N','a','m','e',' ','2',0}; + static const WCHAR auxvalue3W[] = {'A','u','x',' ','N','a','m','e',' ','3',0}; + static const WCHAR auxvalue4W[] = {'A','u','x',' ','N','a','m','e',' ','4',0}; + + static const char auxvalues[][16] = { + "Aux Name 0", + "Aux Name 1", + "Aux Name 2", + "Aux Name 3", + "Aux Name 4" + }; + + HKEY clsidhkey, hkey, auxhkey, classkey; + DWORD form, ret, disposition; + WCHAR clsidW[39]; + ULONG_PTR cookie; + HANDLE handle; + HRESULT hr; + WCHAR *str; + int i; + + for (form = 0; form <= USERCLASSTYPE_APPNAME+1; form++) { + hr = OleRegGetUserType(&CLSID_Testclass, form, NULL); + ok(hr == E_INVALIDARG, "form %u: got 0x%08x\n", form, hr); + + str = (void*)0xdeadbeef; + hr = OleRegGetUserType(&CLSID_Testclass, form, &str); + ok(hr == REGDB_E_CLASSNOTREG, "form %u: got 0x%08x\n", form, hr); + ok(str == NULL, "form %u: got %p\n", form, str); + + /* same string returned for StdFont for all form types */ + str = NULL; + hr = OleRegGetUserType(&CLSID_StdFont, form, &str); + ok(hr == S_OK, "form %u: got 0x%08x\n", form, hr); + ok(!lstrcmpW(str, stdfont_usertypeW) || !lstrcmpW(str, stdfont2_usertypeW) /* winxp */, + "form %u, got %s\n", form, wine_dbgstr_w(str)); + CoTaskMemFree(str); + } + + if ((handle = activate_context(actctx_manifest, &cookie))) + { + for (form = 0; form <= USERCLASSTYPE_APPNAME+1; form++) { + str = (void*)0xdeadbeef; + hr = OleRegGetUserType(&CLSID_Testclass, form, &str); + ok(hr == REGDB_E_CLASSNOTREG, "form %u: got 0x%08x\n", form, hr); + ok(str == NULL, "form %u: got %s\n", form, wine_dbgstr_w(str)); + + /* same string returned for StdFont for all form types */ + str = NULL; + hr = OleRegGetUserType(&CLSID_StdFont, form, &str); + ok(hr == S_OK, "form %u: got 0x%08x\n", form, hr); + ok(!lstrcmpW(str, stdfont_usertypeW) || !lstrcmpW(str, stdfont2_usertypeW) /* winxp */, + "form %u, got %s\n", form, wine_dbgstr_w(str)); + CoTaskMemFree(str); + } + + pDeactivateActCtx(0, cookie); + pReleaseActCtx(handle); + } + + /* test using registered CLSID */ + StringFromGUID2(&CLSID_non_existent, clsidW, sizeof(clsidW)/sizeof(clsidW[0])); + + ret = RegCreateKeyExW(HKEY_CLASSES_ROOT, clsidkeyW, 0, NULL, 0, KEY_ALL_ACCESS, NULL, &clsidhkey, &disposition); + if (ret == ERROR_ACCESS_DENIED) + { + skip("Failed to create test key, skipping some of OleRegGetUserType() tests.\n"); + return; + } + + ok(!ret, "failed to create a key %d, error %d\n", ret, GetLastError()); + + ret = RegCreateKeyExW(clsidhkey, clsidW, 0, NULL, 0, KEY_ALL_ACCESS, NULL, &classkey, NULL); + ok(!ret, "failed to create a key %d, error %d\n", ret, GetLastError()); + + ret = RegSetValueExW(classkey, NULL, 0, REG_SZ, (const BYTE*)defvalueW, sizeof(defvalueW)); + ok(!ret, "got %d, error %d\n", ret, GetLastError()); + + ret = RegCreateKeyExA(classkey, "AuxUserType", 0, NULL, 0, KEY_ALL_ACCESS, NULL, &auxhkey, NULL); + ok(!ret, "got %d, error %d\n", ret, GetLastError()); + + /* populate AuxUserType */ + for (i = 0; i <= 4; i++) { + char name[16]; + + sprintf(name, "AuxUserType\\%d", i); + ret = RegCreateKeyExA(classkey, name, 0, NULL, 0, KEY_ALL_ACCESS, NULL, &hkey, NULL); + ok(!ret, "got %d, error %d\n", ret, GetLastError()); + + ret = RegSetValueExA(hkey, NULL, 0, REG_SZ, (const BYTE*)auxvalues[i], strlen(auxvalues[i])); + ok(!ret, "got %d, error %d\n", ret, GetLastError()); + RegCloseKey(hkey); + } + + str = NULL; + hr = OleRegGetUserType(&CLSID_non_existent, 0, &str); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(!lstrcmpW(str, auxvalue0W), "got %s\n", wine_dbgstr_w(str)); + CoTaskMemFree(str); + + str = NULL; + hr = OleRegGetUserType(&CLSID_non_existent, USERCLASSTYPE_FULL, &str); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(!lstrcmpW(str, defvalueW), "got %s\n", wine_dbgstr_w(str)); + CoTaskMemFree(str); + + str = NULL; + hr = OleRegGetUserType(&CLSID_non_existent, USERCLASSTYPE_SHORT, &str); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(!lstrcmpW(str, auxvalue2W), "got %s\n", wine_dbgstr_w(str)); + CoTaskMemFree(str); + + str = NULL; + hr = OleRegGetUserType(&CLSID_non_existent, USERCLASSTYPE_APPNAME, &str); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(!lstrcmpW(str, auxvalue3W), "got %s\n", wine_dbgstr_w(str)); + CoTaskMemFree(str); + + str = NULL; + hr = OleRegGetUserType(&CLSID_non_existent, USERCLASSTYPE_APPNAME+1, &str); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(!lstrcmpW(str, auxvalue4W), "got %s\n", wine_dbgstr_w(str)); + CoTaskMemFree(str); + + str = NULL; + hr = OleRegGetUserType(&CLSID_non_existent, USERCLASSTYPE_APPNAME+2, &str); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(!lstrcmpW(str, defvalueW), "got %s\n", wine_dbgstr_w(str)); + CoTaskMemFree(str); + + /* registry cleanup */ + for (i = 0; i <= 4; i++) + { + char name[2]; + sprintf(name, "%d", i); + RegDeleteKeyA(auxhkey, name); + } + RegCloseKey(auxhkey); + RegDeleteKeyA(classkey, "AuxUserType"); + RegCloseKey(classkey); + RegDeleteKeyW(clsidhkey, clsidW); + RegCloseKey(clsidhkey); + if (disposition == REG_CREATED_NEW_KEY) + RegDeleteKeyA(HKEY_CLASSES_ROOT, "CLSID"); } static void test_CoCreateGuid(void) @@ -2628,6 +2849,93 @@ CoUninitialize(); } +static void test_CoGetMalloc(void) +{ + IMalloc *imalloc; + HRESULT hr; + +if (0) /* crashes on native */ + hr = CoGetMalloc(0, NULL); + + imalloc = (void*)0xdeadbeef; + hr = CoGetMalloc(0, &imalloc); + ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(imalloc == NULL, "got %p\n", imalloc); + + imalloc = (void*)0xdeadbeef; + hr = CoGetMalloc(MEMCTX_SHARED, &imalloc); + ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(imalloc == NULL, "got %p\n", imalloc); + + imalloc = (void*)0xdeadbeef; + hr = CoGetMalloc(MEMCTX_MACSYSTEM, &imalloc); + ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(imalloc == NULL, "got %p\n", imalloc); + + imalloc = (void*)0xdeadbeef; + hr = CoGetMalloc(MEMCTX_UNKNOWN, &imalloc); + ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(imalloc == NULL, "got %p\n", imalloc); + + imalloc = (void*)0xdeadbeef; + hr = CoGetMalloc(MEMCTX_SAME, &imalloc); + ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(imalloc == NULL, "got %p\n", imalloc); + + imalloc = NULL; + hr = CoGetMalloc(MEMCTX_TASK, &imalloc); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(imalloc != NULL, "got %p\n", imalloc); + IMalloc_Release(imalloc); +} + +static void test_CoGetApartmentType(void) +{ + APTTYPEQUALIFIER qualifier; + APTTYPE type; + HRESULT hr; + + if (!pCoGetApartmentType) + { + win_skip("CoGetApartmentType not present\n"); + return; + } + + hr = pCoGetApartmentType(NULL, NULL); + ok(hr == E_INVALIDARG, "CoGetApartmentType succeeded, error: 0x%0x\n", hr); + + hr = pCoGetApartmentType(&type, NULL); + ok(hr == E_INVALIDARG, "CoGetApartmentType succeeded, error: 0x%0x\n", hr); + + hr = pCoGetApartmentType(NULL, &qualifier); + ok(hr == E_INVALIDARG, "CoGetApartmentType succeeded, error: 0x%0x\n", hr); + + hr = pCoGetApartmentType(&type, &qualifier); + ok(hr == CO_E_NOTINITIALIZED, "CoGetApartmentType succeeded, error: 0x%0x\n", hr); + ok(type == APTTYPE_CURRENT, "Expected APTTYPE_CURRENT, got %u\n", type); + ok(qualifier == APTTYPEQUALIFIER_NONE, "Expected APTTYPEQUALIFIER_NONE, got %u\n", qualifier); + + hr = pCoInitializeEx(NULL, COINIT_APARTMENTTHREADED); + ok(!hr, "CoInitializeEx failed, error: 0x%08x\n", hr); + + hr = pCoGetApartmentType(&type, &qualifier); + ok(!hr, "CoGetApartmentType failed, error: 0x%08x\n", hr); + ok(type == APTTYPE_MAINSTA, "Expected APTTYPE_MAINSTA, got %u\n", type); + ok(qualifier == APTTYPEQUALIFIER_NONE, "Expected APTTYPEQUALIFIER_NONE, got %u\n", qualifier); + + CoUninitialize(); + + hr = pCoInitializeEx(NULL, COINIT_MULTITHREADED); + ok(!hr, "CoInitializeEx failed, error: 0x%08x\n", hr); + + hr = pCoGetApartmentType(&type, &qualifier); + ok(!hr, "CoGetApartmentType failed, error: 0x%08x\n", hr); + ok(type == APTTYPE_MTA, "Expected APTTYPE_MTA, got %u\n", type); + ok(qualifier == APTTYPEQUALIFIER_NONE, "Expected APTTYPEQUALIFIER_NONE, got %u\n", qualifier); + + CoUninitialize(); +} + static void init_funcs(void) { HMODULE hOle32 = GetModuleHandleA("ole32"); @@ -2639,6 +2947,7 @@ pCoGetTreatAsClass = (void*)GetProcAddress(hOle32,"CoGetTreatAsClass"); pCoTreatAsClass = (void*)GetProcAddress(hOle32,"CoTreatAsClass"); pCoGetContextToken = (void*)GetProcAddress(hOle32, "CoGetContextToken"); + pCoGetApartmentType = (void*)GetProcAddress(hOle32, "CoGetApartmentType"); pRegDeleteKeyExA = (void*)GetProcAddress(hAdvapi32, "RegDeleteKeyExA"); pRegOverridePredefKey = (void*)GetProcAddress(hAdvapi32, "RegOverridePredefKey"); pCoInitializeEx = (void*)GetProcAddress(hOle32, "CoInitializeEx"); @@ -2687,7 +2996,11 @@ test_CoGetContextToken(); test_TreatAsClass(); test_CoInitializeEx(); + test_OleInitialize_InitCounting(); test_OleRegGetMiscStatus(); test_CoCreateGuid(); test_CoWaitForMultipleHandles(); -} + test_CoGetMalloc(); + test_OleRegGetUserType(); + test_CoGetApartmentType(); +} Modified: trunk/rostests/winetests/ole32/hglobalstream.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/ole32/hglobalst…
============================================================================== --- trunk/rostests/winetests/ole32/hglobalstream.c [iso-8859-1] (original) +++ trunk/rostests/winetests/ole32/hglobalstream.c [iso-8859-1] Fri Mar 4 09:30:16 2016 @@ -2,6 +2,7 @@ * Stream on HGLOBAL Tests * * Copyright 2006 Robert Shearman (for CodeWeavers) + * Copyright 2016 Dmitry Timoshkov * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -513,10 +514,239 @@ IStream_Release(pStream); } +static void stream_info(IStream *stream, HGLOBAL *hmem, int *size, int *pos) +{ + HRESULT hr; + STATSTG stat; + LARGE_INTEGER offset; + ULARGE_INTEGER newpos; + + *hmem = 0; + *size = *pos = -1; + + hr = GetHGlobalFromStream(stream, hmem); + ok(hr == S_OK, "unexpected %#x\n", hr); + + memset(&stat, 0x55, sizeof(stat)); + hr = IStream_Stat(stream, &stat, STATFLAG_DEFAULT); + ok(hr == S_OK, "unexpected %#x\n", hr); + ok(stat.type == STGTY_STREAM, "unexpected %#x\n", stat.type); + ok(!stat.pwcsName, "unexpected %p\n", stat.pwcsName); + ok(IsEqualIID(&stat.clsid, &GUID_NULL), "unexpected %s\n", wine_dbgstr_guid(&stat.clsid)); + ok(!stat.cbSize.HighPart, "unexpected %#x\n", stat.cbSize.HighPart); + *size = stat.cbSize.LowPart; + + offset.QuadPart = 0; + hr = IStream_Seek(stream, offset, STREAM_SEEK_CUR, &newpos); + ok(hr == S_OK, "unexpected %#x\n", hr); + ok(!newpos.HighPart, "unexpected %#x\n", newpos.HighPart); + *pos = newpos.LowPart; +} + +static void test_IStream_Clone(void) +{ + static const char hello[] = "Hello World!"; + char buf[32]; + HRESULT hr; + IStream *stream, *clone; + HGLOBAL orig_hmem, hmem, hmem_clone; + ULARGE_INTEGER newsize; + LARGE_INTEGER offset; + int size, pos, ret; + + /* test simple case for Clone */ + orig_hmem = GlobalAlloc(GMEM_MOVEABLE, 0); + ok(orig_hmem != 0, "unexpected %p\n", orig_hmem); + hr = CreateStreamOnHGlobal(orig_hmem, TRUE, &stream); + ok(hr == S_OK, "unexpected %#x\n", hr); + + hr = GetHGlobalFromStream(stream, NULL); + ok(hr == E_INVALIDARG, "unexpected %#x\n", hr); + + hr = GetHGlobalFromStream(NULL, &hmem); + ok(hr == E_INVALIDARG, "unexpected %#x\n", hr); + + stream_info(stream, &hmem, &size, &pos); + ok(hmem == orig_hmem, "handles should match\n"); + ok(size == 0, "unexpected %d\n", size); + ok(pos == 0, "unexpected %d\n", pos); + + hr = IStream_Clone(stream, &clone); + ok(hr == S_OK, "unexpected %#x\n", hr); + + hr = IStream_Write(stream, hello, sizeof(hello), NULL); + ok(hr == S_OK, "unexpected %#x\n", hr); + + stream_info(stream, &hmem, &size, &pos); + ok(hmem != 0, "unexpected %p\n", hmem); + ok(size == 13, "unexpected %d\n", size); + ok(pos == 13, "unexpected %d\n", pos); + + stream_info(clone, &hmem_clone, &size, &pos); + ok(hmem_clone == hmem, "handles should match\n"); + ok(size == 13, "unexpected %d\n", size); + ok(pos == 0, "unexpected %d\n", pos); + + buf[0] = 0; + hr = IStream_Read(clone, buf, sizeof(buf), NULL); + ok(hr == S_OK, "unexpected %#x\n", hr); + ok(!strcmp(buf, hello), "wrong stream contents\n"); + + newsize.QuadPart = 0x8000; + hr = IStream_SetSize(stream, newsize); + ok(hr == S_OK, "unexpected %#x\n", hr); + + stream_info(stream, &hmem, &size, &pos); + ok(hmem != 0, "unexpected %p\n", hmem); + ok(hmem == orig_hmem, "unexpected %p\n", hmem); + ok(size == 0x8000, "unexpected %#x\n", size); + ok(pos == 13, "unexpected %d\n", pos); + + stream_info(clone, &hmem_clone, &size, &pos); + ok(hmem_clone == hmem, "handles should match\n"); + ok(size == 0x8000, "unexpected %#x\n", size); + ok(pos == 13, "unexpected %d\n", pos); + + IStream_Release(clone); + IStream_Release(stream); + + /* exploit GMEM_FIXED forced move for the same base streams */ + orig_hmem = GlobalAlloc(GMEM_FIXED, 1); + ok(orig_hmem != 0, "unexpected %p\n", orig_hmem); + hr = CreateStreamOnHGlobal(orig_hmem, TRUE, &stream); + ok(hr == S_OK, "unexpected %#x\n", hr); + + hr = IStream_Clone(stream, &clone); + ok(hr == S_OK, "unexpected %#x\n", hr); + + stream_info(stream, &hmem, &size, &pos); + ok(hmem != 0, "unexpected %p\n", hmem); + ok(size == 1, "unexpected %d\n", size); + ok(pos == 0, "unexpected %d\n", pos); + + stream_info(clone, &hmem_clone, &size, &pos); + ok(hmem_clone == hmem, "handles should match\n"); + ok(size == 1, "unexpected %d\n", size); + ok(pos == 0, "unexpected %d\n", pos); + + newsize.QuadPart = 0x8000; + hr = IStream_SetSize(stream, newsize); + ok(hr == S_OK, "unexpected %#x\n", hr); + + stream_info(stream, &hmem, &size, &pos); + ok(hmem != 0, "unexpected %p\n", hmem); + ok(hmem != orig_hmem, "unexpected %p\n", hmem); + ok(size == 0x8000, "unexpected %#x\n", size); + ok(pos == 0, "unexpected %d\n", pos); + + stream_info(clone, &hmem_clone, &size, &pos); + ok(hmem_clone == hmem, "handles should match\n"); + ok(size == 0x8000, "unexpected %#x\n", size); + ok(pos == 0, "unexpected %d\n", pos); + + IStream_Release(stream); + IStream_Release(clone); + + /* exploit GMEM_FIXED forced move for different base streams */ + orig_hmem = GlobalAlloc(GMEM_FIXED, 1); + ok(orig_hmem != 0, "unexpected %p\n", orig_hmem); + hr = CreateStreamOnHGlobal(orig_hmem, TRUE, &stream); + ok(hr == S_OK, "unexpected %#x\n", hr); + + hr = CreateStreamOnHGlobal(orig_hmem, TRUE, &clone); + ok(hr == S_OK, "unexpected %#x\n", hr); + + stream_info(stream, &hmem, &size, &pos); + ok(hmem != 0, "unexpected %p\n", hmem); + ok(size == 1, "unexpected %d\n", size); + ok(pos == 0, "unexpected %d\n", pos); + + stream_info(clone, &hmem_clone, &size, &pos); + ok(hmem_clone == hmem, "handles should match\n"); + ok(size == 1, "unexpected %d\n", size); + ok(pos == 0, "unexpected %d\n", pos); + + newsize.QuadPart = 0x8000; + hr = IStream_SetSize(stream, newsize); + ok(hr == S_OK, "unexpected %#x\n", hr); + + stream_info(stream, &hmem, &size, &pos); + ok(hmem != 0, "unexpected %p\n", hmem); + ok(hmem != orig_hmem, "unexpected %p\n", hmem); + ok(size == 0x8000, "unexpected %#x\n", size); + ok(pos == 0, "unexpected %d\n", pos); + + stream_info(clone, &hmem_clone, &size, &pos); + ok(hmem_clone != hmem, "handles should not match\n"); + ok(size == 1, "unexpected %#x\n", size); + ok(pos == 0, "unexpected %d\n", pos); + + IStream_Release(stream); + /* releasing clone leads to test termination under windows + IStream_Release(clone); + */ + + /* test Release for a being cloned stream */ + hr = CreateStreamOnHGlobal(0, TRUE, &stream); + ok(hr == S_OK, "unexpected %#x\n", hr); + + hr = IStream_Clone(stream, &clone); + ok(hr == S_OK, "unexpected %#x\n", hr); + + stream_info(stream, &hmem, &size, &pos); + ok(hmem != 0, "unexpected %p\n", hmem); + ok(size == 0, "unexpected %d\n", size); + ok(pos == 0, "unexpected %d\n", pos); + + stream_info(clone, &hmem_clone, &size, &pos); + ok(hmem_clone == hmem, "handles should match\n"); + ok(size == 0, "unexpected %#x\n", size); + ok(pos == 0, "unexpected %d\n", pos); + + ret = IStream_Release(stream); + ok(ret == 0, "unexpected %d\n", ret); + + newsize.QuadPart = 0x8000; + hr = IStream_SetSize(clone, newsize); + ok(hr == S_OK, "unexpected %#x\n", hr); + + stream_info(clone, &hmem_clone, &size, &pos); + ok(hmem_clone == hmem, "handles should match\n"); + ok(size == 0x8000, "unexpected %#x\n", size); + ok(pos == 0, "unexpected %d\n", pos); + + hr = IStream_Write(clone, hello, sizeof(hello), NULL); + ok(hr == S_OK, "unexpected %#x\n", hr); + + stream_info(clone, &hmem_clone, &size, &pos); + ok(hmem_clone == hmem, "handles should match\n"); + ok(size == 0x8000, "unexpected %#x\n", size); + ok(pos == 13, "unexpected %d\n", pos); + + offset.QuadPart = 0; + hr = IStream_Seek(clone, offset, STREAM_SEEK_SET, NULL); + ok(hr == S_OK, "unexpected %#x\n", hr); + + buf[0] = 0; + hr = IStream_Read(clone, buf, sizeof(buf), NULL); + ok(hr == S_OK, "unexpected %#x\n", hr); + ok(!strcmp(buf, hello), "wrong stream contents\n"); + + stream_info(clone, &hmem_clone, &size, &pos); + ok(hmem_clone == hmem, "handles should match\n"); + ok(size == 0x8000, "unexpected %#x\n", size); + ok(pos == 32, "unexpected %d\n", pos); + + ret = IStream_Release(clone); + ok(ret == 0, "unexpected %d\n", ret); +} + START_TEST(hglobalstream) { HRESULT hr; IStream *pStream; + + test_IStream_Clone(); hr = CreateStreamOnHGlobal(NULL, TRUE, &pStream); ok_ole_success(hr, "CreateStreamOnHGlobal"); Modified: trunk/rostests/winetests/ole32/ole2.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/ole32/ole2.c?re…
============================================================================== --- trunk/rostests/winetests/ole32/ole2.c [iso-8859-1] (original) +++ trunk/rostests/winetests/ole32/ole2.c [iso-8859-1] Fri Mar 4 09:30:16 2016 @@ -113,7 +113,7 @@ static BOOL g_showRunnable = TRUE; static BOOL g_isRunning = TRUE; -static BOOL g_failGetMiscStatus; +static HRESULT g_GetMiscStatusFailsWith = S_OK; static HRESULT g_QIFailsWith; static UINT cf_test_1, cf_test_2, cf_test_3; @@ -423,12 +423,15 @@ static HRESULT WINAPI OleObject_GetMiscStatus ( IOleObject *iface, - DWORD dwAspect, + DWORD aspect, DWORD *pdwStatus ) { CHECK_EXPECTED_METHOD("OleObject_GetMiscStatus"); - if(!g_failGetMiscStatus) + + ok(aspect == DVASPECT_CONTENT, "got aspect %d\n", aspect); + + if (g_GetMiscStatusFailsWith == S_OK) { *pdwStatus = OLEMISC_RECOMPOSEONRESIZE; return S_OK; @@ -436,7 +439,7 @@ else { *pdwStatus = 0x1234; - return E_FAIL; + return g_GetMiscStatusFailsWith; } } @@ -483,7 +486,7 @@ static HRESULT WINAPI OleObjectPersistStg_QueryInterface(IPersistStorage *iface, REFIID riid, void **ppv) { trace("OleObjectPersistStg_QueryInterface\n"); - return IUnknown_QueryInterface((IUnknown *)&OleObject, riid, ppv); + return IOleObject_QueryInterface(&OleObject, riid, ppv); } static ULONG WINAPI OleObjectPersistStg_AddRef(IPersistStorage *iface) @@ -581,7 +584,7 @@ static HRESULT WINAPI OleObjectCache_QueryInterface(IOleCache *iface, REFIID riid, void **ppv) { - return IUnknown_QueryInterface((IUnknown *)&OleObject, riid, ppv); + return IOleObject_QueryInterface(&OleObject, riid, ppv); } static ULONG WINAPI OleObjectCache_AddRef(IOleCache *iface) @@ -707,7 +710,7 @@ static HRESULT WINAPI OleObjectCF_CreateInstance(IClassFactory *iface, IUnknown *punkOuter, REFIID riid, void **ppv) { - return IUnknown_QueryInterface((IUnknown *)&OleObject, riid, ppv); + return IOleObject_QueryInterface(&OleObject, riid, ppv); } static HRESULT WINAPI OleObjectCF_LockServer(IClassFactory *iface, BOOL lock) @@ -728,7 +731,7 @@ static HRESULT WINAPI OleObjectRunnable_QueryInterface(IRunnableObject *iface, REFIID riid, void **ppv) { - return IUnknown_QueryInterface((IUnknown *)&OleObject, riid, ppv); + return IOleObject_QueryInterface(&OleObject, riid, ppv); } static ULONG WINAPI OleObjectRunnable_AddRef(IRunnableObject *iface) @@ -917,6 +920,30 @@ { "OleObjectCache_Release", 0 }, { "OleObject_Release", 0 }, { "OleObject_Release", TEST_OPTIONAL /* NT4 only */ }, + { NULL, 0 } + }; + static const struct expected_method methods_olerender_draw_with_site[] = + { + { "OleObject_QueryInterface", 0 }, + { "OleObject_AddRef", 0 }, + { "OleObject_QueryInterface", 0 }, + { "OleObject_AddRef", 0 }, + { "OleObject_GetMiscStatus", 0 }, + { "OleObject_QueryInterface", 0 }, + { "OleObjectPersistStg_AddRef", 0 }, + { "OleObjectPersistStg_InitNew", 0 }, + { "OleObjectPersistStg_Release", 0 }, + { "OleObject_SetClientSite", 0 }, + { "OleObject_Release", 0 }, + { "OleObject_QueryInterface", 0 }, + { "OleObjectRunnable_AddRef", 0 }, + { "OleObjectRunnable_Run", 0 }, + { "OleObjectRunnable_Release", 0 }, + { "OleObject_QueryInterface", 0 }, + { "OleObjectCache_AddRef", 0 }, + { "OleObjectCache_Cache", 0 }, + { "OleObjectCache_Release", 0 }, + { "OleObject_Release", 0 }, { NULL, 0 } }; static const struct expected_method methods_olerender_format[] = @@ -1021,6 +1048,23 @@ IOleObject_Release(pObject); CHECK_NO_EXTRA_METHODS(); + expected_method_list = methods_olerender_draw_with_site; + trace("OleCreate with OLERENDER_DRAW, with site:\n"); + hr = OleCreate(&CLSID_Equation3, &IID_IOleObject, OLERENDER_DRAW, NULL, (IOleClientSite*)0xdeadbeef, pStorage, (void **)&pObject); + ok_ole_success(hr, "OleCreate"); + IOleObject_Release(pObject); + CHECK_NO_EXTRA_METHODS(); + + /* GetMiscStatus fails */ + g_GetMiscStatusFailsWith = 0x8fafefaf; + expected_method_list = methods_olerender_draw_with_site; + trace("OleCreate with OLERENDER_DRAW, with site:\n"); + hr = OleCreate(&CLSID_Equation3, &IID_IOleObject, OLERENDER_DRAW, NULL, (IOleClientSite*)0xdeadbeef, pStorage, (void **)&pObject); + ok_ole_success(hr, "OleCreate"); + IOleObject_Release(pObject); + CHECK_NO_EXTRA_METHODS(); + g_GetMiscStatusFailsWith = S_OK; + formatetc.cfFormat = CF_TEXT; formatetc.ptd = NULL; formatetc.dwAspect = DVASPECT_CONTENT; @@ -1094,7 +1138,7 @@ /* Test once with IOleObject_GetMiscStatus failing */ expected_method_list = methods_oleload; - g_failGetMiscStatus = TRUE; + g_GetMiscStatusFailsWith = E_FAIL; trace("OleLoad:\n"); hr = OleLoad(pStorage, &IID_IOleObject, (IOleClientSite *)0xdeadbeef, (void **)&pObject); ok(hr == S_OK || @@ -1110,9 +1154,9 @@ IOleObject_Release(pObject); CHECK_NO_EXTRA_METHODS(); } + g_GetMiscStatusFailsWith = S_OK; /* Test again, let IOleObject_GetMiscStatus succeed. */ - g_failGetMiscStatus = FALSE; expected_method_list = methods_oleload; trace("OleLoad:\n"); hr = OleLoad(pStorage, &IID_IOleObject, (IOleClientSite *)0xdeadbeef, (void **)&pObject); @@ -1453,6 +1497,39 @@ }; static IDataObject DataObject = { &DataObjectVtbl }; + +static HRESULT WINAPI Unknown_QueryInterface(IUnknown *iface, REFIID riid, void **ppv) +{ + *ppv = NULL; + if (IsEqualIID(riid, &IID_IUnknown)) *ppv = iface; + if (*ppv) + { + IUnknown_AddRef((IUnknown *)*ppv); + return S_OK; + } + return E_NOINTERFACE; +} + +static ULONG WINAPI Unknown_AddRef(IUnknown *iface) +{ + ok(0, "unexpected AddRef\n"); + return 2; +} + +static ULONG WINAPI Unknown_Release(IUnknown *iface) +{ + ok(0, "unexpected Release\n"); + return 1; +} + +static const IUnknownVtbl UnknownVtbl = +{ + Unknown_QueryInterface, + Unknown_AddRef, + Unknown_Release +}; + +static IUnknown unknown = { &UnknownVtbl }; static void test_data_cache(void) { @@ -1523,6 +1600,17 @@ hr = StgCreateDocfile(NULL, STGM_READWRITE | STGM_CREATE | STGM_SHARE_EXCLUSIVE | STGM_DELETEONRELEASE, 0, &pStorage); ok_ole_success(hr, "StgCreateDocfile"); + + /* aggregation */ + + /* requested is not IUnknown */ + hr = CreateDataCache(&unknown, &CLSID_NULL, &IID_IOleCache2, (void**)&pOleCache); +todo_wine + ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + + hr = CreateDataCache(&unknown, &CLSID_NULL, &IID_IUnknown, (void**)&pOleCache); + ok(hr == S_OK, "got 0x%08x\n", hr); + IOleCache2_Release(pOleCache); /* Test with new data */ @@ -1870,13 +1958,13 @@ CLSID cls; SIZEL sz; - hr = CreateDataCache( NULL, &CLSID_Picture_Metafile, &IID_IUnknown, (void *)&unk ); + hr = CreateDataCache( NULL, &CLSID_Picture_Metafile, &IID_IUnknown, (void **)&unk ); ok( SUCCEEDED(hr), "got %08x\n", hr ); - hr = IUnknown_QueryInterface( unk, &IID_IPersistStorage, (void *)&persist ); + hr = IUnknown_QueryInterface( unk, &IID_IPersistStorage, (void **)&persist ); ok( SUCCEEDED(hr), "got %08x\n", hr ); - hr = IUnknown_QueryInterface( unk, &IID_IDataObject, (void *)&data ); + hr = IUnknown_QueryInterface( unk, &IID_IDataObject, (void **)&data ); ok( SUCCEEDED(hr), "got %08x\n", hr ); - hr = IUnknown_QueryInterface( unk, &IID_IViewObject2, (void *)&view ); + hr = IUnknown_QueryInterface( unk, &IID_IViewObject2, (void **)&view ); ok( SUCCEEDED(hr), "got %08x\n", hr ); stg = create_storage( num ); @@ -2172,34 +2260,6 @@ g_showRunnable = TRUE; } -static HRESULT WINAPI Unknown_QueryInterface(IUnknown *iface, REFIID riid, void **ppv) -{ - *ppv = NULL; - if (IsEqualIID(riid, &IID_IUnknown)) *ppv = iface; - if (*ppv) - { - IUnknown_AddRef((IUnknown *)*ppv); - return S_OK; - } - return E_NOINTERFACE; -} - -static ULONG WINAPI Unknown_AddRef(IUnknown *iface) -{ - return 2; -} - -static ULONG WINAPI Unknown_Release(IUnknown *iface) -{ - return 1; -} - -static const IUnknownVtbl UnknownVtbl = -{ - Unknown_QueryInterface, - Unknown_AddRef, - Unknown_Release -}; static HRESULT WINAPI OleRun_QueryInterface(IRunnableObject *iface, REFIID riid, void **ppv) { @@ -2272,7 +2332,6 @@ OleRun_SetContainedObject }; -static IUnknown unknown = { &UnknownVtbl }; static IRunnableObject testrunnable = { &oleruntestvtbl }; static void test_OleRun(void) @@ -2291,7 +2350,7 @@ { HRESULT hr; - hr = OleLockRunning((LPUNKNOWN)&unknown, TRUE, FALSE); + hr = OleLockRunning(&unknown, TRUE, FALSE); ok(hr == S_OK, "OleLockRunning failed 0x%08x\n", hr); } Modified: trunk/rostests/winetests/ole32/propvariant.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/ole32/propvaria…
============================================================================== --- trunk/rostests/winetests/ole32/propvariant.c [iso-8859-1] (original) +++ trunk/rostests/winetests/ole32/propvariant.c [iso-8859-1] Fri Mar 4 09:30:16 2016 @@ -364,18 +364,12 @@ struct _PMemoryAllocator_vtable *vt; } PMemoryAllocator; -#ifdef __i386__ -#define __thiscall_wrapper __stdcall -#else -#define __thiscall_wrapper __cdecl -#endif - -static void * __thiscall_wrapper PMemoryAllocator_Allocate(PMemoryAllocator *_this, ULONG cbSize) +static void * WINAPI PMemoryAllocator_Allocate(PMemoryAllocator *_this, ULONG cbSize) { return CoTaskMemAlloc(cbSize); } -static void __thiscall_wrapper PMemoryAllocator_Free(PMemoryAllocator *_this, void *pv) +static void WINAPI PMemoryAllocator_Free(PMemoryAllocator *_this, void *pv) { CoTaskMemFree(pv); } Modified: trunk/rostests/winetests/ole32/storage32.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/ole32/storage32…
============================================================================== --- trunk/rostests/winetests/ole32/storage32.c [iso-8859-1] (original) +++ trunk/rostests/winetests/ole32/storage32.c [iso-8859-1] Fri Mar 4 09:30:16 2016 @@ -1180,7 +1180,7 @@ { IStorage *stg = NULL; HRESULT r; - CLSID temp_cls; + CLSID temp_cls, cls2; DeleteFileA(filenameA); @@ -1191,6 +1191,12 @@ r = ReadClassStg( NULL, NULL ); ok(r == E_INVALIDARG, "ReadClassStg should return E_INVALIDARG instead of 0x%08X\n", r); + + memset(&temp_cls, 0xcc, sizeof(temp_cls)); + memset(&cls2, 0xcc, sizeof(cls2)); + r = ReadClassStg( NULL, &temp_cls ); + ok(r == E_INVALIDARG, "got 0x%08x\n", r); + ok(IsEqualCLSID(&temp_cls, &cls2), "got wrong clsid\n"); r = ReadClassStg( stg, NULL ); ok(r == E_INVALIDARG, "ReadClassStg should return E_INVALIDARG instead of 0x%08X\n", r); @@ -1961,7 +1967,7 @@ static void test_ReadClassStm(void) { - CLSID clsid; + CLSID clsid, clsid2; HRESULT hr; IStream *pStream; static const LARGE_INTEGER llZero; @@ -1976,6 +1982,12 @@ hr = ReadClassStm(pStream, NULL); ok(hr == E_INVALIDARG, "ReadClassStm should have returned E_INVALIDARG instead of 0x%08x\n", hr); + + memset(&clsid, 0xcc, sizeof(clsid)); + memset(&clsid2, 0xcc, sizeof(clsid2)); + hr = ReadClassStm(NULL, &clsid); + ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(IsEqualCLSID(&clsid, &clsid2), "got wrong clsid\n"); /* test not rewound stream */ hr = ReadClassStm(pStream, &clsid);
9 years, 1 month
1
0
0
0
[akhaldi] 70900: [PSDK] Update objidl.idl. CORE-10912
by akhaldi@svn.reactos.org
Author: akhaldi Date: Fri Mar 4 09:20:21 2016 New Revision: 70900 URL:
http://svn.reactos.org/svn/reactos?rev=70900&view=rev
Log: [PSDK] Update objidl.idl. CORE-10912 Modified: trunk/reactos/include/psdk/objidl.idl Modified: trunk/reactos/include/psdk/objidl.idl URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/objidl.idl?re…
============================================================================== --- trunk/reactos/include/psdk/objidl.idl [iso-8859-1] (original) +++ trunk/reactos/include/psdk/objidl.idl [iso-8859-1] Fri Mar 4 09:20:21 2016 @@ -2327,6 +2327,15 @@ APTTYPE_MAINSTA = 3 } APTTYPE; +typedef enum _APTTYPEQUALIFIER { + APTTYPEQUALIFIER_NONE = 0, + APTTYPEQUALIFIER_IMPLICIT_MTA = 1, + APTTYPEQUALIFIER_NA_ON_MTA = 2, + APTTYPEQUALIFIER_NA_ON_STA = 3, + APTTYPEQUALIFIER_NA_ON_IMPLICIT_MTA = 4, + APTTYPEQUALIFIER_NA_ON_MAINSTA = 5 +} APTTYPEQUALIFIER; + typedef enum _THDTYPE { THDTYPE_BLOCKMESSAGES = 0, THDTYPE_PROCESSMESSAGES = 1 @@ -2451,6 +2460,17 @@ HRESULT Dummy([in] HICON hIcon, [in] HDC hdc); } +[ + object, + local, + pointer_default(unique), + uuid(a2f05a09-27a2-42b5-bc0e-ac163ef49d9b) +] +interface IApartmentShutdown : IUnknown +{ + void OnUninitialize([in] UINT64 identifier); +} + cpp_quote("#ifdef USE_COM_CONTEXT_DEF") typedef DWORD CPFLAGS;
9 years, 1 month
1
0
0
0
[ekohl] 70898: [TIMEDATE] Brazilian Portuguese translation for timedate.cpl. Patch by Edison Henrique Andreassy. CORE-10919 #resolve #comment Thanks a lot!
by ekohl@svn.reactos.org
Author: ekohl Date: Thu Mar 3 20:16:39 2016 New Revision: 70898 URL:
http://svn.reactos.org/svn/reactos?rev=70898&view=rev
Log: [TIMEDATE] Brazilian Portuguese translation for timedate.cpl. Patch by Edison Henrique Andreassy. CORE-10919 #resolve #comment Thanks a lot! Added: trunk/reactos/dll/cpl/timedate/lang/pt-BR.rc (with props) Modified: trunk/reactos/dll/cpl/timedate/timedate.rc Added: trunk/reactos/dll/cpl/timedate/lang/pt-BR.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/timedate/lang/pt-B…
============================================================================== --- trunk/reactos/dll/cpl/timedate/lang/pt-BR.rc (added) +++ trunk/reactos/dll/cpl/timedate/lang/pt-BR.rc [iso-8859-1] Thu Mar 3 20:16:39 2016 @@ -0,0 +1,57 @@ +LANGUAGE LANG_PORTUGUESE, SUBLANG_NEUTRAL + +IDD_DATETIMEPAGE DIALOGEX 0, 0, 252, 146 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Data e hora" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + GROUPBOX "&Data", -1, 4, 2, 122, 125 + COMBOBOX IDC_MONTHCB, 11, 17, 50, 120, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + EDITTEXT IDC_YEARTEXT, 65, 17, 55, 12, ES_LEFT | WS_GROUP | ES_READONLY + CONTROL "", IDC_YEAR, UPDOWN_CLASS, UDS_SETBUDDYINT | UDS_NOTHOUSANDS | + UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | WS_BORDER | WS_GROUP, 120, 17, 50, 12 + CONTROL "", IDC_MONTHCALENDAR, "MonthCalWnd", WS_CHILD | WS_VISIBLE | WS_TABSTOP, 11, 37, 108, 80, WS_EX_CLIENTEDGE + GROUPBOX "&Hora", -1, 132, 2, 113, 125 + CONTROL "", IDC_TIMEPICKER, "SysDateTimePick32", DTS_TIMEFORMAT | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 144, 105, 90, 12 + LTEXT "", IDC_TIMEZONE, 6, 132, 242, 11 + CONTROL "", IDC_CLOCKWND, "ClockWndClass", WS_CHILD | WS_VISIBLE, 138, 12, 102, 89 +END + +IDD_TIMEZONEPAGE DIALOGEX 0, 0, 252, 146 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Fuso horário" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + COMBOBOX IDC_TIMEZONELIST, 5, 4, 241, 136, CBS_DROPDOWNLIST | WS_VSCROLL | WS_VISIBLE | WS_TABSTOP + CONTROL "", IDC_WORLD_BACKGROUND, "Static", SS_OWNERDRAW, 5, 20, 240, 110, WS_EX_STATICEDGE + AUTOCHECKBOX "Ajustar automaticamente o relógio para o &horário de verão", + IDC_AUTODAYLIGHT, 6, 132, 242, 11, WS_VISIBLE | WS_GROUP | WS_TABSTOP +END + +IDD_INETTIMEPAGE DIALOGEX 0, 0, 252, 146 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Horário na Internet" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + COMBOBOX IDC_SERVERLIST, 65, 22, 117, 136, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + AUTOCHECKBOX "&Sincronizar automaticamente com um servidor de horário na Internet", + IDC_AUTOSYNC, 11, 7, 241, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP + LTEXT "Servidor:", IDC_SERVERTEXT, 34, 22, 28, 13 + PUSHBUTTON "A&tualizar agora", IDC_UPDATEBUTTON, 187, 22, 56, 14 + LTEXT "", IDC_SUCSYNC, 12, 54, 214, 23 + LTEXT "", IDC_NEXTSYNC, 12, 96, 137, 12 + LTEXT "A sincronização só pode ocorrer quando o computador está conectado à Internet.", -1, 12, 114, 225, 25 +END + +STRINGTABLE +BEGIN + IDS_CPLNAME "Data e hora" + IDS_CPLDESCRIPTION "Define a data, a hora e o fuso horário para o computador" + IDS_TIMEZONETEXT "Fuso horário atual: %s" + IDS_TIMEZONEINVALID "Inválido" + IDS_TIMEZONEUNKNOWN "Desconhecido" + IDS_INETTIMESUCSYNC "A hora foi sincronizada com sucesso com %s em %s às %s" + IDS_INETTIMENEXTSYNC "Próxima sincronização: %s às %s" + IDS_INETTIMESYNCING "Aguarde enquanto o ReactOS é sincronizado com %s" + IDS_INETTIMEERROR "Erro enquanto o ReactOS estava sincronizando com %s" +END Propchange: trunk/reactos/dll/cpl/timedate/lang/pt-BR.rc ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/dll/cpl/timedate/timedate.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/timedate/timedate.…
============================================================================== --- trunk/reactos/dll/cpl/timedate/timedate.rc [iso-8859-1] (original) +++ trunk/reactos/dll/cpl/timedate/timedate.rc [iso-8859-1] Thu Mar 3 20:16:39 2016 @@ -71,6 +71,9 @@ #ifdef LANGUAGE_PL_PL #include "lang/pl-PL.rc" #endif +#ifdef LANGUAGE_PT_BR + #include "lang/pt-BR.rc" +#endif #ifdef LANGUAGE_RO_RO #include "lang/ro-RO.rc" #endif
9 years, 1 month
1
0
0
0
[hbelusca] 70899: [HELP]: Use ARRAYSIZE(buffer) instead of hardcoding its size.
by hbelusca@svn.reactos.org
Author: hbelusca Date: Thu Mar 3 23:00:55 2016 New Revision: 70899 URL:
http://svn.reactos.org/svn/reactos?rev=70899&view=rev
Log: [HELP]: Use ARRAYSIZE(buffer) instead of hardcoding its size. Modified: trunk/reactos/base/applications/cmdutils/help/help.c Modified: trunk/reactos/base/applications/cmdutils/help/help.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils…
============================================================================== --- trunk/reactos/base/applications/cmdutils/help/help.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/cmdutils/help/help.c [iso-8859-1] Thu Mar 3 23:00:55 2016 @@ -30,7 +30,7 @@ va_list args; va_start(args, resID); - LoadStringW(GetModuleHandleW(NULL), resID, bufSrc, RC_STRING_MAX_SIZE); + LoadStringW(GetModuleHandleW(NULL), resID, bufSrc, ARRAYSIZE(bufSrc)); vswprintf(bufFormatted, bufSrc, args); CharToOemW(bufFormatted, bufFormattedOem); fputs(bufFormattedOem, stdout);
9 years, 1 month
1
0
0
0
[ekohl] 70897: Brazilian Portuguese translation for console.dll. Patch by Edison Henrique Andreassy. CORE-10918 #resolve #comment Thanks a lot!
by ekohl@svn.reactos.org
Author: ekohl Date: Thu Mar 3 20:13:25 2016 New Revision: 70897 URL:
http://svn.reactos.org/svn/reactos?rev=70897&view=rev
Log: Brazilian Portuguese translation for console.dll. Patch by Edison Henrique Andreassy. CORE-10918 #resolve #comment Thanks a lot! Added: trunk/reactos/dll/cpl/console/lang/pt-BR.rc (with props) Modified: trunk/reactos/dll/cpl/console/console.rc Modified: trunk/reactos/dll/cpl/console/console.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/console/console.rc…
============================================================================== --- trunk/reactos/dll/cpl/console/console.rc [iso-8859-1] (original) +++ trunk/reactos/dll/cpl/console/console.rc [iso-8859-1] Thu Mar 3 20:13:25 2016 @@ -60,6 +60,9 @@ #ifdef LANGUAGE_PL_PL #include "lang/pl-PL.rc" #endif +#ifdef LANGUAGE_PT_BR + #include "lang/pt-BR.rc" +#endif #ifdef LANGUAGE_RO_RO #include "lang/ro-RO.rc" #endif Added: trunk/reactos/dll/cpl/console/lang/pt-BR.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/console/lang/pt-BR…
============================================================================== --- trunk/reactos/dll/cpl/console/lang/pt-BR.rc (added) +++ trunk/reactos/dll/cpl/console/lang/pt-BR.rc [iso-8859-1] Thu Mar 3 20:13:25 2016 @@ -0,0 +1,154 @@ +LANGUAGE LANG_PORTUGUESE, SUBLANG_NEUTRAL + +IDD_PROPPAGEOPTIONS DIALOGEX 0, 0, 253, 220 +STYLE DS_SHELLFONT | WS_CHILD | WS_CAPTION +CAPTION "Opções" +FONT 8, "MS Shell Dlg" +BEGIN + GROUPBOX "Tamanho do cursor", -1, 7, 7, 120, 70, WS_CHILD | WS_VISIBLE | WS_GROUP + CONTROL "&Pequeno", IDC_RADIO_SMALL_CURSOR, "Button", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 15, 20, 90, 10 + CONTROL "&Médio", IDC_RADIO_MEDIUM_CURSOR, "Button", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 15, 40, 90, 10 + CONTROL "&Grande", IDC_RADIO_LARGE_CURSOR, "Button", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 15, 60, 90, 10 + GROUPBOX "Opções de exibição", -1, 133, 7, 112, 70, WS_CHILD | WS_VISIBLE | WS_GROUP + CONTROL "&Janela", IDC_RADIO_DISPLAY_WINDOW, "Button", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 142, 20, 70, 10 + CONTROL "T&ela inteira", IDC_RADIO_DISPLAY_FULL, "Button", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 142, 40, 70, 10 + GROUPBOX "Histórico de comandos", -1, 7, 85, 120, 77, WS_CHILD | WS_VISIBLE | WS_GROUP + LTEXT "&Tamanho do buffer:", -1, 14, 101, 70, 12 + EDITTEXT IDC_EDIT_BUFFER_SIZE, 90, 97, 30, 15, ES_RIGHT | ES_NUMBER | WS_GROUP + CONTROL "", IDC_UPDOWN_BUFFER_SIZE, UPDOWN_CLASS, UDS_SETBUDDYINT | UDS_ALIGNRIGHT | + UDS_AUTOBUDDY | UDS_ARROWKEYS | WS_GROUP, 119, 97, 12, 15 + LTEXT "&Número de buffers:", -1, 14, 124, 70, 12 + EDITTEXT IDC_EDIT_NUM_BUFFER, 90, 120, 30, 15, ES_RIGHT | ES_NUMBER | WS_GROUP + CONTROL "", IDC_UPDOWN_NUM_BUFFER, UPDOWN_CLASS, UDS_SETBUDDYINT | UDS_ALIGNRIGHT | + UDS_AUTOBUDDY | UDS_ARROWKEYS | WS_GROUP, 119, 120, 12, 15 + CHECKBOX "&Descartar duplicatas antigas", IDC_CHECK_DISCARD_DUPLICATES, 12, 140, 110, 15 + GROUPBOX "Opções de edição", -1, 133, 85, 112, 77, BS_GROUPBOX | WS_CHILD | WS_VISIBLE | WS_GROUP + CHECKBOX "Modo de edição &rápida", IDC_CHECK_QUICK_EDIT, 140, 97, 102, 15, WS_CHILD | WS_VISIBLE | WS_TABSTOP + CHECKBOX "Modo de &inserção", IDC_CHECK_INSERT_MODE, 140, 113, 76, 15, WS_CHILD | WS_VISIBLE | WS_TABSTOP +END + +IDD_PROPPAGEFONT DIALOGEX 0, 0, 253, 220 +STYLE DS_SHELLFONT | WS_CHILD | WS_CAPTION +CAPTION "Fonte" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "Visualização da janela", -1, 10, 10, 94, 10 + LTEXT "&Tamanho", -1, 180, 10, 36, 10 + CONTROL "", IDC_STATIC_FONT_WINDOW_PREVIEW, "Static", SS_OWNERDRAW | SS_SUNKEN, 10, 20, 163, 74 + LISTBOX IDC_LBOX_FONTSIZE, 181, 20, 55, 80, LBS_SORT | LBS_HASSTRINGS | WS_VSCROLL + LTEXT "&Fonte", -1, 10, 105, 33, 10 + CHECKBOX "Fontes em &negrito", IDC_CHECK_BOLD_FONTS, 46, 105, 76, 10 + LISTBOX IDC_LBOX_FONTTYPE, 10, 120, 110, 40, LBS_SORT | LBS_HASSTRINGS | WS_VSCROLL + GROUPBOX "", IDC_GROUPBOX_FONT_NAME, 6, 156, 241, 50 + CONTROL "", IDC_STATIC_SELECT_FONT_PREVIEW, "Static", SS_OWNERDRAW | SS_SUNKEN, 16, 165, 95, 35 + LTEXT "Cada caractere tem:", -1, 124, 166, 75, 10 + LTEXT "pixels de largura\npixels de altura", -1, 136, 180, 101, 20 + LTEXT "", IDC_FONT_SIZE_X, 120, 180, 10, 10 + LTEXT "", IDC_FONT_SIZE_Y, 120, 188, 10, 10 +END + +IDD_PROPPAGELAYOUT DIALOGEX 0, 0, 253, 220 +STYLE DS_SHELLFONT | WS_CHILD | WS_CAPTION +CAPTION "Layout" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "Visualização da janela", -1, 8, 6, 95, 10 + CONTROL "", IDC_STATIC_LAYOUT_WINDOW_PREVIEW, "Static", SS_SUNKEN | SS_OWNERDRAW, 8, 16, 115, 70 + GROUPBOX "Tamanho do buffer de tela", -1, 130, 12, 115, 50 + LTEXT "&Largura:", -1, 140, 28, 40, 10 + LTEXT "&Altura:", -1, 140, 46, 39, 10 + EDITTEXT IDC_EDIT_SCREEN_BUFFER_WIDTH, 203, 25, 35, 14, ES_RIGHT | ES_NUMBER | WS_GROUP + CONTROL "", IDC_UPDOWN_SCREEN_BUFFER_WIDTH, UPDOWN_CLASS, UDS_NOTHOUSANDS | + UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | WS_GROUP, 238, 25, 13, 14 + EDITTEXT IDC_EDIT_SCREEN_BUFFER_HEIGHT, 203, 42, 35, 14, ES_RIGHT | ES_NUMBER | WS_GROUP + CONTROL "", IDC_UPDOWN_SCREEN_BUFFER_HEIGHT, UPDOWN_CLASS, UDS_NOTHOUSANDS | + UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | WS_GROUP, 238, 42, 13, 14 + GROUPBOX "Tamanho da janela", -1, 130, 65, 115, 47 + LTEXT "Lar&gura:", -1, 140, 78, 39, 10 + LTEXT "Altu&ra:", -1, 140, 95, 37, 10 + EDITTEXT IDC_EDIT_WINDOW_SIZE_WIDTH, 203, 75, 35, 14, ES_RIGHT | ES_NUMBER | WS_GROUP + CONTROL "", IDC_UPDOWN_WINDOW_SIZE_WIDTH, UPDOWN_CLASS, UDS_NOTHOUSANDS | + UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | WS_GROUP, 238, 75, 13, 14 + EDITTEXT IDC_EDIT_WINDOW_SIZE_HEIGHT, 203, 92, 35, 14, ES_RIGHT | ES_NUMBER | WS_GROUP + CONTROL "", IDC_UPDOWN_WINDOW_SIZE_HEIGHT, UPDOWN_CLASS, UDS_NOTHOUSANDS | + UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | WS_GROUP, 238, 92, 13, 14 + GROUPBOX "Posição da janela", -1, 130, 116, 115, 64 + LTEXT "&Esquerda:", -1, 140, 132, 38, 10 + LTEXT "&Superior:", -1, 140, 149, 40, 10 + EDITTEXT IDC_EDIT_WINDOW_POS_LEFT, 203, 128, 35, 14, ES_RIGHT | ES_NUMBER | WS_GROUP + CONTROL "", IDC_UPDOWN_WINDOW_POS_LEFT, UPDOWN_CLASS, UDS_NOTHOUSANDS | + UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | WS_GROUP, 238, 128, 13, 14 + EDITTEXT IDC_EDIT_WINDOW_POS_TOP, 203, 146, 35, 14, ES_RIGHT | ES_NUMBER | WS_GROUP + CONTROL "", IDC_UPDOWN_WINDOW_POS_TOP, UPDOWN_CLASS, UDS_NOTHOUSANDS | + UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | WS_GROUP, 238, 146, 13, 14 + CHECKBOX "&Deixar o sistema posicionar a janela", IDC_CHECK_SYSTEM_POS_WINDOW, 137, 165, 104, 10 +END + +IDD_PROPPAGECOLORS DIALOGEX 0, 0, 253, 220 +STYLE DS_SHELLFONT | WS_CHILD | WS_CAPTION +CAPTION "Cores" +FONT 8, "MS Shell Dlg" +BEGIN + CONTROL "&Texto da tela", IDC_RADIO_SCREEN_TEXT, "Button", BS_AUTORADIOBUTTON | + WS_CHILD | WS_VISIBLE | WS_TABSTOP, 10, 12, 90, 10 + CONTROL "Plano de &fundo da tela", IDC_RADIO_SCREEN_BACKGROUND, "Button", BS_AUTORADIOBUTTON | + WS_CHILD | WS_VISIBLE | WS_TABSTOP, 10, 24, 90, 10 + CONTROL "Te&xto pop-up", IDC_RADIO_POPUP_TEXT, "Button", BS_AUTORADIOBUTTON | + WS_CHILD | WS_VISIBLE | WS_TABSTOP, 10, 36, 90, 10 + CONTROL "Plano de fun&do pop-up", IDC_RADIO_POPUP_BACKGROUND, "Button", BS_AUTORADIOBUTTON | + WS_CHILD | WS_VISIBLE | WS_TABSTOP, 10, 48, 90, 10 + GROUPBOX "Valores de cor selecionados", -1, 105, 6, 140, 60 + LTEXT "&Vermelho:", -1, 135, 18, 30, 10 + EDITTEXT IDC_EDIT_COLOR_RED, 175, 16, 35, 14, ES_RIGHT | ES_NUMBER | WS_GROUP + CONTROL "", IDC_UPDOWN_COLOR_RED, UPDOWN_CLASS, UDS_SETBUDDYINT | UDS_ALIGNRIGHT | + UDS_AUTOBUDDY | UDS_ARROWKEYS | WS_GROUP, 210, 16, 10, 14 + LTEXT "V&erde:", -1, 135, 34, 30, 10 + EDITTEXT IDC_EDIT_COLOR_GREEN, 175, 32, 35, 14, ES_RIGHT | ES_NUMBER | WS_GROUP + CONTROL "", IDC_UPDOWN_COLOR_GREEN, UPDOWN_CLASS, UDS_SETBUDDYINT | UDS_ALIGNRIGHT | + UDS_AUTOBUDDY | UDS_ARROWKEYS | WS_GROUP, 210, 32, 10, 14 + LTEXT "A&zul:", -1, 135, 50, 30, 10 + EDITTEXT IDC_EDIT_COLOR_BLUE, 175, 48, 35, 14, ES_RIGHT | ES_NUMBER | WS_GROUP + CONTROL "", IDC_UPDOWN_COLOR_BLUE, UPDOWN_CLASS, UDS_SETBUDDYINT | UDS_ALIGNRIGHT | + UDS_AUTOBUDDY | UDS_ARROWKEYS | WS_GROUP, 210, 48, 10, 14 + CONTROL "", IDC_STATIC_COLOR1, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 23, 80, 12, 12 + CONTROL "", IDC_STATIC_COLOR2, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 36, 80, 12, 12 + CONTROL "", IDC_STATIC_COLOR3, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 49, 80, 12, 12 + CONTROL "", IDC_STATIC_COLOR4, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 62, 80, 12, 12 + CONTROL "", IDC_STATIC_COLOR5, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 75, 80, 12, 12 + CONTROL "", IDC_STATIC_COLOR6, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 88, 80, 12, 12 + CONTROL "", IDC_STATIC_COLOR7, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 101, 80, 12, 12 + CONTROL "", IDC_STATIC_COLOR8, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 114, 80, 12, 12 + CONTROL "", IDC_STATIC_COLOR9, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 127, 80, 12, 12 + CONTROL "", IDC_STATIC_COLOR10, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 140, 80, 12, 12 + CONTROL "", IDC_STATIC_COLOR11, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 153, 80, 12, 12 + CONTROL "", IDC_STATIC_COLOR12, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 166, 80, 12, 12 + CONTROL "", IDC_STATIC_COLOR13, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 179, 80, 12, 12 + CONTROL "", IDC_STATIC_COLOR14, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 192, 80, 12, 12 + CONTROL "", IDC_STATIC_COLOR15, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 205, 80, 12, 12 + CONTROL "", IDC_STATIC_COLOR16, "Static", SS_NOTIFY | SS_SUNKEN | SS_OWNERDRAW, 218, 80, 12, 12 + GROUPBOX "Cores selecionadas para a tela", -1, 8, 100, 237, 55 + CONTROL "", IDC_STATIC_SCREEN_COLOR, "Static", SS_OWNERDRAW | SS_SUNKEN, 13, 110, 227, 40 + GROUPBOX "Cores pop-up selecionadas", -1, 8, 160, 237, 55 + CONTROL "", IDC_STATIC_POPUP_COLOR, "Static", SS_OWNERDRAW | SS_SUNKEN, 13, 170, 227, 40 +END + +IDD_APPLYOPTIONS DIALOGEX 0, 0, 220, 79 +STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION +CAPTION "Aplicar propriedades" +FONT 8, "MS Shell Dlg" +BEGIN + CONTROL "&Aplicar as propriedades apenas à janela atual", IDC_RADIO_APPLY_CURRENT, + "Button", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 12, 12, 207, 10 + CONTROL "&Salvar as propriedades para janelas futuras com o mesmo tÃtulo", IDC_RADIO_APPLY_ALL, + "Button", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 12, 31, 207, 10 + PUSHBUTTON "OK", IDOK, 58, 58, 50, 14, WS_VISIBLE + PUSHBUTTON "Cancelar", IDCANCEL, 114, 58, 50, 14, WS_VISIBLE +END + +STRINGTABLE +BEGIN + IDS_CPLNAME "Console" + IDS_CPLDESCRIPTION "Configura as propriedades do console." + IDS_APPLY_SHORTCUT_ALL "&Modificar o atalho que iniciou esta janela" + IDS_RASTERFONTS "Fontes de varredura" +END Propchange: trunk/reactos/dll/cpl/console/lang/pt-BR.rc ------------------------------------------------------------------------------ svn:eol-style = native
9 years, 1 month
1
0
0
0
[ekohl] 70896: Brazilian Portuguese translation for access.cpl. Patch by Edison Henrique Andreassy. CORE-10916 #resolve #comment Thanks a lot!
by ekohl@svn.reactos.org
Author: ekohl Date: Thu Mar 3 20:10:20 2016 New Revision: 70896 URL:
http://svn.reactos.org/svn/reactos?rev=70896&view=rev
Log: Brazilian Portuguese translation for access.cpl. Patch by Edison Henrique Andreassy. CORE-10916 #resolve #comment Thanks a lot! Added: trunk/reactos/dll/cpl/access/lang/pt-BR.rc (with props) Modified: trunk/reactos/dll/cpl/access/access.rc Modified: trunk/reactos/dll/cpl/access/access.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/access/access.rc?r…
============================================================================== --- trunk/reactos/dll/cpl/access/access.rc [iso-8859-1] (original) +++ trunk/reactos/dll/cpl/access/access.rc [iso-8859-1] Thu Mar 3 20:10:20 2016 @@ -64,6 +64,9 @@ #ifdef LANGUAGE_PL_PL #include "lang/pl-PL.rc" #endif +#ifdef LANGUAGE_PT_BR + #include "lang/pt-BR.rc" +#endif #ifdef LANGUAGE_RO_RO #include "lang/ro-RO.rc" #endif Added: trunk/reactos/dll/cpl/access/lang/pt-BR.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/access/lang/pt-BR.…
============================================================================== --- trunk/reactos/dll/cpl/access/lang/pt-BR.rc (added) +++ trunk/reactos/dll/cpl/access/lang/pt-BR.rc [iso-8859-1] Thu Mar 3 20:10:20 2016 @@ -0,0 +1,291 @@ +LANGUAGE LANG_PORTUGUESE, SUBLANG_NEUTRAL + +IDD_PROPPAGEKEYBOARD DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Teclado" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + GROUPBOX "Teclas de aderência", -1, PROPSHEETPADDING(1), LABELLINE(1), PROPSHEETWIDTH - PROPSHEETPADDING(2), LABELLINE(6) + PROPSHEETPADDING(1) + LTEXT "Use as teclas de aderência se você desejar usar SHIFT, CTRL, ALT ou a tecla de logotipo do Windows pressionando uma tecla de cada vez.", + -1, PROPSHEETPADDING(2), LABELLINE(2), PROPSHEETWIDTH - PROPSHEETPADDING(4), LABELLINE(3) + AUTOCHECKBOX "&Usar as teclas de aderência", IDC_STICKY_BOX, PROPSHEETPADDING(2), LABELLINE(5) + 2, PROPSHEETWIDTH - PROPSHEETPADDING(20), 14 + PUSHBUTTON "&Configurações", IDC_STICKY_BUTTON, PROPSHEETWIDTH - PROPSHEETPADDING(17), LABELLINE(5) + 2, PROPSHEETPADDING(15), 14 + GROUPBOX "Teclas de filtragem", -1, PROPSHEETPADDING(1), LABELLINE(8) + 5, PROPSHEETWIDTH - PROPSHEETPADDING(2), LABELLINE(7) + 2 + LTEXT "Use as teclas de filtragem para que o Windows ignore teclas pressionadas rápida ou repetidamente ou para que ele diminua a taxa de repetição.", + -1, PROPSHEETPADDING(2), LABELLINE(10) - 3, PROPSHEETWIDTH - PROPSHEETPADDING(4), LABELLINE(3) + AUTOCHECKBOX "Usar as teclas de &filtragem", IDC_FILTER_BOX, PROPSHEETPADDING(2), LABELLINE(13) + 2, PROPSHEETWIDTH - PROPSHEETPADDING(20), 14 + PUSHBUTTON "C&onfigurações", IDC_FILTER_BUTTON, PROPSHEETWIDTH - PROPSHEETPADDING(17), LABELLINE(13) + 2, PROPSHEETPADDING(15), 14 + GROUPBOX "Teclas de alternância", -1, PROPSHEETPADDING(1), LABELLINE(16) + 3, PROPSHEETWIDTH - PROPSHEETPADDING(2), LABELLINE(6) + PROPSHEETPADDING(1) + LTEXT "Use as teclas de alternância para ouvir sons quando pressionar CAPS LOCK, NUM LOCK e SCROLL LOCK.", + -1, PROPSHEETPADDING(2), LABELLINE(18) - 3, PROPSHEETWIDTH - PROPSHEETPADDING(4), LABELLINE(2) + AUTOCHECKBOX "Usar as &teclas de alternância", IDC_TOGGLE_BOX, PROPSHEETPADDING(2), LABELLINE(20) + 2, PROPSHEETWIDTH - PROPSHEETPADDING(20), 14 + PUSHBUTTON "Co&nfigurações", IDC_TOGGLE_BUTTON, PROPSHEETWIDTH - PROPSHEETPADDING(17), LABELLINE(20) + 2, PROPSHEETPADDING(15), 14 + AUTOCHECKBOX "Fornecer ajuda &extra para teclado em programas", IDC_KEYBOARD_EXTRA, + PROPSHEETPADDING(1), LABELLINE(23) + 3, PROPSHEETWIDTH - PROPSHEETPADDING(2), 14 +END + +IDD_PROPPAGESOUND DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Som" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + GROUPBOX "Sinalizador de som", -1, PROPSHEETPADDING(1), LABELLINE(1), PROPSHEETWIDTH - PROPSHEETPADDING(2), LABELLINE(10) + PROPSHEETPADDING(1) + LTEXT "Use o sinalizador de som se desejar que o Windows gere avisos visuais quando o sistema emitir um som.", + -1, PROPSHEETPADDING(2), LABELLINE(2), PROPSHEETWIDTH - PROPSHEETPADDING(4), LABELLINE(3) + AUTOCHECKBOX "U&sar o sinalizador de som", IDC_SENTRY_BOX, PROPSHEETPADDING(2), LABELLINE(5) + 2, PROPSHEETPADDING(15), 14 + LTEXT "Escolha o aviso visual:", IDC_SENTRY_TEXT, PROPSHEETPADDING(2), LABELLINE(8) - 2, PROPSHEETWIDTH - PROPSHEETPADDING(4), LABELLINE(1) + COMBOBOX IDC_SENTRY_COMBO, PROPSHEETPADDING(2), LABELLINE(9), PROPSHEETWIDTH - PROPSHEETPADDING(4), LABELLINE(6), + CBS_DROPDOWNLIST | WS_VSCROLL | WS_VISIBLE | WS_TABSTOP + GROUPBOX "Mostrar sons", -1, PROPSHEETPADDING(1), LABELLINE(12) + 5, PROPSHEETWIDTH - PROPSHEETPADDING(2), LABELLINE(7) + 2 + LTEXT "Use este recurso se desejar que os programas exibam legendas para a fala e os sons emitidos.", + -1, PROPSHEETPADDING(2), LABELLINE(14) - 3, PROPSHEETWIDTH - PROPSHEETPADDING(4), LABELLINE(3) + AUTOCHECKBOX "&Usar o recurso para mostrar sons", IDC_SSHOW_BOX, PROPSHEETPADDING(2), LABELLINE(16) + 2, PROPSHEETWIDTH - PROPSHEETPADDING(4), 14 +END + +IDD_PROPPAGEDISPLAY DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "VÃdeo" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + GROUPBOX "Alto contraste", -1, PROPSHEETPADDING(1), LABELLINE(1), PROPSHEETWIDTH - PROPSHEETPADDING(2), LABELLINE(6) + PROPSHEETPADDING(1) + LTEXT "Use esta opção para que o Windows utilize cores e fontes que facilitam a leitura.", + -1, PROPSHEETPADDING(2), LABELLINE(2), PROPSHEETWIDTH - PROPSHEETPADDING(4), LABELLINE(3) + AUTOCHECKBOX "&Usar alto contraste", IDC_CONTRAST_BOX, PROPSHEETPADDING(2), LABELLINE(5) + 2, PROPSHEETWIDTH - PROPSHEETPADDING(20), 14 + PUSHBUTTON "&Configurações", IDC_CONTRAST_BUTTON, PROPSHEETWIDTH - PROPSHEETPADDING(17), LABELLINE(5) + 2, PROPSHEETPADDING(15), 14 + GROUPBOX "Opções do cursor", -1, PROPSHEETPADDING(1), LABELLINE(8) + 5, PROPSHEETWIDTH - PROPSHEETPADDING(2), LABELLINE(13) + LTEXT "Mova os controles deslizantes para alterar a velocidade com que o cursor pisca (taxa de intermitência do cursor) e sua largura.", + -1, PROPSHEETPADDING(2), LABELLINE(9) + 5, PROPSHEETWIDTH - PROPSHEETPADDING(4), LABELLINE(2) + CTEXT "&Taxa de intermitência:", -1, PROPSHEETPADDING(2), LABELLINE(12) + 5, PROPSHEETWIDTH - PROPSHEETPADDING(4), LABELLINE(1) + LTEXT "Nenhuma", -1, PROPSHEETPADDING(3), LABELLINE(14) + 2, PROPSHEETPADDING(6), LABELLINE(1) + LTEXT "Rápida", -1, PROPSHEETWIDTH - PROPSHEETPADDING(9), LABELLINE(14) + 2, PROPSHEETPADDING(6), LABELLINE(1) + CONTROL "", IDC_CURSOR_BLINK_TRACK, "msctls_trackbar32", TBS_AUTOTICKS | WS_TABSTOP, + PROPSHEETPADDING(10), LABELLINE(14), PROPSHEETWIDTH - PROPSHEETPADDING(20), LABELLINE(2) + CTEXT "La&rgura:", -1, PROPSHEETPADDING(2), LABELLINE(17), PROPSHEETWIDTH - PROPSHEETPADDING(4), LABELLINE(1) + LTEXT "Estreito", -1, PROPSHEETPADDING(3), LABELLINE(18) + 7, PROPSHEETPADDING(6), LABELLINE(1) + LTEXT "Largo", -1, PROPSHEETWIDTH - PROPSHEETPADDING(9), LABELLINE(18) + 7, PROPSHEETPADDING(6), LABELLINE(1) + CONTROL "", IDC_CURSOR_WIDTH_TRACK, "msctls_trackbar32", TBS_AUTOTICKS | WS_TABSTOP, + PROPSHEETPADDING(10), LABELLINE(18) + 5, PROPSHEETWIDTH - PROPSHEETPADDING(20), LABELLINE(2) + LTEXT "", IDC_CURSOR_WIDTH_TEXT, PROPSHEETPADDING(3), LABELLINE(16), PROPSHEETPADDING(4), LABELLINE(1) + 5 +END + +IDD_PROPPAGEMOUSE DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Mouse" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + GROUPBOX "Teclas para mouse", -1, PROPSHEETPADDING(1), LABELLINE(1), PROPSHEETWIDTH - PROPSHEETPADDING(2), LABELLINE(6) + PROPSHEETPADDING(1) + LTEXT "Use as teclas para mouse para controlar o ponteiro com o teclado numérico.", + -1, PROPSHEETPADDING(2), LABELLINE(2), PROPSHEETWIDTH - PROPSHEETPADDING(4), LABELLINE(3) + AUTOCHECKBOX "Usar as teclas para &mouse", IDC_MOUSE_BOX, PROPSHEETPADDING(2), LABELLINE(5) + 2, PROPSHEETWIDTH - PROPSHEETPADDING(20), 14 + PUSHBUTTON "&Configurações", IDC_MOUSE_BUTTON, PROPSHEETWIDTH - PROPSHEETPADDING(17), LABELLINE(5) + 2, PROPSHEETPADDING(15), 14 +END + +IDD_PROPPAGEGENERAL DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Geral" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + GROUPBOX "Reconfiguração automática", -1, PROPSHEETPADDING(1), LABELLINE(1), PROPSHEETWIDTH - PROPSHEETPADDING(2), LABELLINE(5) + AUTOCHECKBOX "&Desativar recursos de acessibilidade se o computador ficar inativo por:", + IDC_RESET_BOX, PROPSHEETPADDING(2), LABELLINE(2) - 2, PROPSHEETWIDTH - PROPSHEETPADDING(4), 14 + COMBOBOX IDC_RESET_COMBO, PROPSHEETPADDING(4), LABELLINE(4), PROPSHEETPADDING(10), LABELLINE(5), + CBS_DROPDOWNLIST | WS_VSCROLL | WS_VISIBLE | WS_TABSTOP + GROUPBOX "Notificação", -1, PROPSHEETPADDING(1), LABELLINE(7) - 2, PROPSHEETWIDTH - PROPSHEETPADDING(2), LABELLINE(5) + AUTOCHECKBOX "&Emitir uma mensagem de aviso ao ativar um recurso", IDC_NOTIFICATION_MESSAGE, + PROPSHEETPADDING(2), LABELLINE(8) - 2, PROPSHEETWIDTH - PROPSHEETPADDING(4), 14 + AUTOCHECKBOX "Emitir um &som ao ativar ou desativar um recurso", IDC_NOTIFICATION_SOUND, + PROPSHEETPADDING(2), LABELLINE(10) - 2, PROPSHEETWIDTH - PROPSHEETPADDING(4), 14 + GROUPBOX "Dispositivos seriais de acessibilidade", -1, PROPSHEETPADDING(1), LABELLINE(13) - 4, PROPSHEETWIDTH - PROPSHEETPADDING(2), LABELLINE(5) + LTEXT "Os dispositivos seriais de acessibilidade permitem o acesso alternativo aos recursos de teclado e mouse.", + -1, PROPSHEETPADDING(2), LABELLINE(14) - 4, PROPSHEETWIDTH - PROPSHEETPADDING(4), LABELLINE(2) + AUTOCHECKBOX "&Usar as teclas seriais", IDC_SERIAL_BOX, PROPSHEETPADDING(2), LABELLINE(16) - 4, PROPSHEETWIDTH - PROPSHEETPADDING(20), 14 + PUSHBUTTON "&Configurações", IDC_SERIAL_BUTTON, PROPSHEETWIDTH - PROPSHEETPADDING(17), LABELLINE(16) - 4, PROPSHEETPADDING(15), 14 + GROUPBOX "Opções administrativas", -1, PROPSHEETPADDING(1), LABELLINE(19) - 4, PROPSHEETWIDTH - PROPSHEETPADDING(2), LABELLINE(5) + AUTOCHECKBOX "&Aplicar todas as configurações à área de trabalho de logon", IDC_ADMIN_LOGON_BOX, + PROPSHEETPADDING(2), LABELLINE(20) - 4, PROPSHEETWIDTH - PROPSHEETPADDING(4), 14 + AUTOCHECKBOX "Aplicar &todas as configurações padrão para novos usuários", IDC_ADMIN_USERS_BOX, + PROPSHEETPADDING(2), LABELLINE(22) - 4, PROPSHEETWIDTH - PROPSHEETPADDING(4), 14 +END + +IDD_STICKYKEYSOPTIONS DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Configurações das teclas de aderência" +FONT 8, "MS Shell Dlg" +BEGIN + GROUPBOX "Atalho do teclado", -1, PROPSHEETPADDING(1), LABELLINE(1), PROPSHEETWIDTH - PROPSHEETPADDING(2), LABELLINE(6) + PROPSHEETPADDING(1) + LTEXT "O atalho para as teclas de aderência é:\npressionar a tecla SHIFT cinco vezes.", + -1, PROPSHEETPADDING(2), LABELLINE(2), PROPSHEETWIDTH - PROPSHEETPADDING(4), LABELLINE(3) + AUTOCHECKBOX "&Usar atalho", IDC_STICKY_ACTIVATE_CHECK, PROPSHEETPADDING(2), LABELLINE(5) + 2, PROPSHEETWIDTH - PROPSHEETPADDING(4), 14 + GROUPBOX "Opções", -1, PROPSHEETPADDING(1), LABELLINE(9), PROPSHEETWIDTH - PROPSHEETPADDING(2), LABELLINE(4) + PROPSHEETPADDING(1) + AUTOCHECKBOX "&Pressionar a tecla modificadora duas vezes para bloquear", IDC_STICKY_LOCK_CHECK, + PROPSHEETPADDING(2), LABELLINE(10), PROPSHEETWIDTH - PROPSHEETPADDING(4), 14 + AUTOCHECKBOX "Desa&tivar teclas de aderência se duas teclas forem pressionadas ao mesmo tempo", IDC_STICKY_UNLOCK_CHECK, + PROPSHEETPADDING(2), LABELLINE(11) + 4, PROPSHEETWIDTH - PROPSHEETPADDING(4), 18, BS_MULTILINE + GROUPBOX "Notificação", -1, PROPSHEETPADDING(1), LABELLINE(15), PROPSHEETWIDTH - PROPSHEETPADDING(2), LABELLINE(4) + PROPSHEETPADDING(1) + AUTOCHECKBOX "&Emitir sons quando a tecla modificadora for pressionada", IDC_STICKY_SOUND_CHECK, + PROPSHEETPADDING(2), LABELLINE(16) + 2, PROPSHEETWIDTH - PROPSHEETPADDING(4), 14 + AUTOCHECKBOX "Mostrar o &status das teclas de aderência na tela", IDC_STICKY_STATUS_CHECK, + PROPSHEETPADDING(2), LABELLINE(18), PROPSHEETWIDTH - PROPSHEETPADDING(4), 14 + DEFPUSHBUTTON "OK", IDOK, PROPSHEETWIDTH - 111, PROPSHEETHEIGHT - 21, 50, 14 + PUSHBUTTON "Cancelar", IDCANCEL, PROPSHEETWIDTH - 57, PROPSHEETHEIGHT - 21, 50, 14 +END + +IDD_FILTERKEYSOPTIONS DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Configurações das teclas de filtragem" +FONT 8, "MS Shell Dlg" +BEGIN + GROUPBOX "Atalho do teclado", -1, PROPSHEETPADDING(1), LABELLINE(1), PROPSHEETWIDTH - PROPSHEETPADDING(2), LABELLINE(6) + PROPSHEETPADDING(1) + LTEXT "O atalho para as teclas de filtragem é: \nmanter a tecla SHIFT direita pressionada por oito segundos.", + -1, PROPSHEETPADDING(2), LABELLINE(2), PROPSHEETWIDTH - PROPSHEETPADDING(4), LABELLINE(3) + AUTOCHECKBOX "&Usar atalho", IDC_FILTER_ACTIVATE_CHECK, PROPSHEETPADDING(2), LABELLINE(5) + 2, PROPSHEETWIDTH - PROPSHEETPADDING(20), 14 + GROUPBOX "Opções de filtragem", -1, PROPSHEETPADDING(1), LABELLINE(8) + 5, PROPSHEETWIDTH - PROPSHEETPADDING(2), LABELLINE(8) + 5 + AUTORADIOBUTTON "&Ignorar pressionamentos de tecla repetidos", IDC_FILTER_BOUNCE_RADIO, + PROPSHEETPADDING(2), LABELLINE(9) + 7, PROPSHEETPADDING(27), LABELLINE(1), WS_GROUP | WS_TABSTOP + AUTORADIOBUTTON "Ig&norar teclas pressionadas rapidamente e diminuir a taxa de repetição", IDC_FILTER_REPEAT_RADIO, + PROPSHEETPADDING(2), LABELLINE(11) + 5, PROPSHEETPADDING(27), LABELLINE(3), BS_TOP | BS_MULTILINE + PUSHBUTTON "&Configurações", IDC_FILTER_BOUNCE_BUTTON, PROPSHEETWIDTH - PROPSHEETPADDING(13), LABELLINE(9) + 5, PROPSHEETPADDING(11), 14, WS_GROUP + PUSHBUTTON "C&onfigurações", IDC_FILTER_REPEAT_BUTTON, PROPSHEETWIDTH - PROPSHEETPADDING(13), LABELLINE(11) + 5, PROPSHEETPADDING(11), 14, WS_GROUP + LTEXT "C&lique e digite aqui para testar a configuração das teclas de filtragem:", -1, PROPSHEETPADDING(2), LABELLINE(14) + 1, PROPSHEETWIDTH - PROPSHEETPADDING(4), LABELLINE(1) + EDITTEXT IDC_FILTER_TEST_EDIT, PROPSHEETPADDING(2), LABELLINE(15) + 1, PROPSHEETWIDTH - PROPSHEETPADDING(4), 14, WS_GROUP | ES_AUTOHSCROLL + GROUPBOX "Notificação", -1, PROPSHEETPADDING(1), LABELLINE(17) + 6, PROPSHEETWIDTH - PROPSHEETPADDING(2), LABELLINE(4) + 3 + AUTOCHECKBOX "&Emitir alarme sonoro para teclas pressionadas ou aceitas", IDC_FILTER_SOUND_CHECK, + PROPSHEETPADDING(2), LABELLINE(19), PROPSHEETWIDTH - PROPSHEETPADDING(4), 10 + AUTOCHECKBOX "E&xibir o status da tecla de filtragem na tela", IDC_FILTER_STATUS_CHECK, + PROPSHEETPADDING(2), LABELLINE(20) + 6, PROPSHEETWIDTH - PROPSHEETPADDING(4), 10 + DEFPUSHBUTTON "OK", IDOK, PROPSHEETWIDTH - 111, PROPSHEETHEIGHT - 21, 50, 14 + PUSHBUTTON "Cancelar", IDCANCEL, PROPSHEETWIDTH - 57, PROPSHEETHEIGHT - 21, 50, 14 +END + +IDD_TOGGLEKEYSOPTIONS DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Configurações das teclas de alternância" +FONT 8, "MS Shell Dlg" +BEGIN + GROUPBOX "Atalho do teclado", -1, PROPSHEETPADDING(1), LABELLINE(1), PROPSHEETWIDTH - PROPSHEETPADDING(2), LABELLINE(6) + PROPSHEETPADDING(1) + LTEXT "O atalho para as teclas de alternância é: \nmanter a tecla NUM LOCK pressionada por cinco segundos.", + -1, PROPSHEETPADDING(2), LABELLINE(2), PROPSHEETWIDTH - PROPSHEETPADDING(4), LABELLINE(3) + AUTOCHECKBOX "&Usar atalho", IDC_TOGGLE_ACTIVATE_CHECK, PROPSHEETPADDING(2), LABELLINE(5) + 2, PROPSHEETWIDTH - PROPSHEETPADDING(4), 14 + DEFPUSHBUTTON "OK", IDOK, PROPSHEETWIDTH - 111, PROPSHEETHEIGHT - 21, 50, 14 + PUSHBUTTON "Cancelar", IDCANCEL, PROPSHEETWIDTH - 57, PROPSHEETHEIGHT - 21, 50, 14 +END + +IDD_CONTRASTOPTIONS DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Configurações de alto contraste" +FONT 8, "MS Shell Dlg" +BEGIN + GROUPBOX "Atalho do teclado", -1, PROPSHEETPADDING(1), LABELLINE(1), PROPSHEETWIDTH - PROPSHEETPADDING(2), LABELLINE(6) + PROPSHEETPADDING(1) + LTEXT "O atalho para o alto contraste é: \npressionar ALT esquerda + SHIFT esquerda + PRINT SCREEN.", + -1, PROPSHEETPADDING(2), LABELLINE(2), PROPSHEETWIDTH - PROPSHEETPADDING(4), LABELLINE(3) + AUTOCHECKBOX "&Usar atalho", IDC_CONTRAST_ACTIVATE_CHECK, PROPSHEETPADDING(2), LABELLINE(5) + 2, PROPSHEETWIDTH - PROPSHEETPADDING(4), 14 + GROUPBOX "Esquema de aparência de alto contraste", -1, PROPSHEETPADDING(1), LABELLINE(9), PROPSHEETWIDTH - PROPSHEETPADDING(2), LABELLINE(4) + PROPSHEETPADDING(1) + LTEXT "O e&squema atual de alto contraste é:", -1, PROPSHEETPADDING(2), LABELLINE(10) + 2, PROPSHEETWIDTH - PROPSHEETPADDING(4), LABELLINE(1) + COMBOBOX IDC_CONTRAST_COMBO, PROPSHEETPADDING(2), LABELLINE(11) + 2, PROPSHEETWIDTH - PROPSHEETPADDING(4), LABELLINE(6), + CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_VISIBLE | WS_TABSTOP + DEFPUSHBUTTON "OK", IDOK, PROPSHEETWIDTH - 111, PROPSHEETHEIGHT - 21, 50, 14 + PUSHBUTTON "Cancelar", IDCANCEL, PROPSHEETWIDTH - 57, PROPSHEETHEIGHT - 21, 50, 14 +END + +IDD_MOUSEKEYSOPTIONS DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Configurações das teclas para mouse" +FONT 8, "MS Shell Dlg" +BEGIN + GROUPBOX "Atalho do teclado", -1, PROPSHEETPADDING(1), LABELLINE(1), PROPSHEETWIDTH - PROPSHEETPADDING(2), LABELLINE(6) + PROPSHEETPADDING(1) + LTEXT "O atalho para as teclas para mouse é: \npressionar ALT esquerda + SHIFT esquerda + NUM LOCK.", + -1, PROPSHEETPADDING(2), LABELLINE(2), PROPSHEETWIDTH - PROPSHEETPADDING(4), LABELLINE(3) + AUTOCHECKBOX "&Usar atalho", IDC_MOUSEKEYS_ACTIVATE_CHECK, + PROPSHEETPADDING(2), LABELLINE(5) + 2, PROPSHEETWIDTH - PROPSHEETPADDING(4), 14 + GROUPBOX "Velocidade do ponteiro", -1, PROPSHEETPADDING(1), LABELLINE(9), PROPSHEETWIDTH - PROPSHEETPADDING(2), LABELLINE(9) + LTEXT "Velocidade &máxima:", -1, PROPSHEETPADDING(2), LABELLINE(10) + 2, PROPSHEETPADDING(8), LABELLINE(2) + LTEXT "Baixa", -1, PROPSHEETPADDING(11), LABELLINE(10) + 4, PROPSHEETPADDING(3), LABELLINE(1) + CONTROL "", IDC_MOUSEKEYS_SPEED_TRACK, "msctls_trackbar32", TBS_AUTOTICKS | WS_TABSTOP, + PROPSHEETPADDING(15), LABELLINE(10) + 2, PROPSHEETWIDTH - PROPSHEETPADDING(22), LABELLINE(2) + LTEXT "Alta", -1, PROPSHEETWIDTH - PROPSHEETPADDING(7), LABELLINE(10) + 4, PROPSHEETPADDING(3), LABELLINE(1) + LTEXT "A&celeração:", -1, PROPSHEETPADDING(2), LABELLINE(13) + 4, PROPSHEETPADDING(8), LABELLINE(1) + LTEXT "Lenta", -1, PROPSHEETPADDING(11), LABELLINE(13) + 4, PROPSHEETPADDING(3), LABELLINE(1) + CONTROL "", IDC_MOUSEKEYS_ACCEL_TRACK, "msctls_trackbar32", TBS_AUTOTICKS | WS_TABSTOP, + PROPSHEETPADDING(15), LABELLINE(13) + 2, PROPSHEETWIDTH - PROPSHEETPADDING(22), LABELLINE(2) + LTEXT "Rápida", -1, PROPSHEETWIDTH - PROPSHEETPADDING(7), LABELLINE(13) + 4, PROPSHEETPADDING(4), LABELLINE(1) + AUTOCHECKBOX "&Pressionar Ctrl p/ aumentar a velocidade e Shift p/ diminuÃ-la", IDC_MOUSEKEYS_SPEED_CHECK, + PROPSHEETPADDING(2), LABELLINE(16), PROPSHEETWIDTH - PROPSHEETPADDING(4), 14 + LTEXT "Usar as teclas para mouse quando Num Lock estiver:", -1, PROPSHEETPADDING(1), LABELLINE(18) + 4, PROPSHEETPADDING(20), LABELLINE(2) + AUTORADIOBUTTON "A&tivado", IDC_MOUSEKEYS_ON_RADIO, PROPSHEETWIDTH - PROPSHEETPADDING(20), LABELLINE(18) + 7, PROPSHEETPADDING(8), LABELLINE(1) + AUTORADIOBUTTON "&Desativado", IDC_MOUSEKEYS_OFF_RADIO, PROPSHEETWIDTH - PROPSHEETPADDING(11), LABELLINE(18) + 7, PROPSHEETPADDING(8), LABELLINE(1) + AUTOCHECKBOX "M&ostrar o status das teclas para mouse na tela", IDC_MOUSEKEYS_STATUS_CHECK, + PROPSHEETPADDING(1), LABELLINE(20) + 2, PROPSHEETWIDTH - PROPSHEETPADDING(4), 14 + DEFPUSHBUTTON "OK", IDOK, PROPSHEETWIDTH - 111, PROPSHEETHEIGHT - 21, 50, 14 + PUSHBUTTON "Cancelar", IDCANCEL, PROPSHEETWIDTH - 57, PROPSHEETHEIGHT - 21, 50, 14 +END + +IDD_BOUNCEKEYSOPTIONS DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Configurações avançadas para teclas de filtragem" +FONT 8, "MS Shell Dlg" +BEGIN + GROUPBOX "Repetição de teclas", -1, PROPSHEETPADDING(1), LABELLINE(1), PROPSHEETWIDTH - PROPSHEETPADDING(2), LABELLINE(5) + LTEXT "&Ignorar pressionamentos de tecla repetidos em um intervalo de tempo menor que:", -1, PROPSHEETPADDING(2), LABELLINE(2) + 1, PROPSHEETWIDTH - PROPSHEETPADDING(4), LABELLINE(2) + COMBOBOX IDC_BOUNCE_TIME_COMBO, PROPSHEETPADDING(2), LABELLINE(3) + 5, PROPSHEETWIDTH - PROPSHEETPADDING(4), LABELLINE(6), + CBS_DROPDOWNLIST | WS_VSCROLL | WS_VISIBLE | WS_TABSTOP + LTEXT "Ã&rea de teste:", -1, PROPSHEETPADDING(1), LABELLINE(7) + 3, PROPSHEETPADDING(8), LABELLINE(1) + EDITTEXT IDC_BOUNCE_TEST_EDIT, PROPSHEETPADDING(10), LABELLINE(7), PROPSHEETWIDTH - PROPSHEETPADDING(11), 14, ES_AUTOHSCROLL + DEFPUSHBUTTON "OK", IDOK, PROPSHEETWIDTH - 111, PROPSHEETHEIGHT - 21, 50, 14 + PUSHBUTTON "Cancelar", IDCANCEL, PROPSHEETWIDTH - 57, PROPSHEETHEIGHT - 21, 50, 14 +END + +IDD_REPEATKEYSOPTIONS DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Configurações avançadas de teclas de filtragem" +FONT 8, "MS Shell Dlg" +BEGIN + GROUPBOX "Teclas de repetição", -1, PROPSHEETPADDING(1), LABELLINE(1), PROPSHEETWIDTH - PROPSHEETPADDING(2), LABELLINE(12) + LTEXT "Anular as configurações de teclado no 'Painel de controle':", + -1, PROPSHEETPADDING(2), LABELLINE(2), PROPSHEETWIDTH - PROPSHEETPADDING(4), LABELLINE(2) + AUTORADIOBUTTON "&Nenhuma repetição de teclado", IDC_REPEAT_NOREPEAT_RADIO, PROPSHEETPADDING(2), LABELLINE(3) + 3, PROPSHEETWIDTH - PROPSHEETPADDING(4), LABELLINE(1), WS_GROUP + AUTORADIOBUTTON "&Diminuir as taxas de repetição de teclado", IDC_REPEAT_REPEAT_RADIO, PROPSHEETPADDING(2), LABELLINE(4) + 7, PROPSHEETWIDTH - PROPSHEETPADDING(4), LABELLINE(1) + LTEXT "&Intervalo de repetição:", -1, PROPSHEETPADDING(4), LABELLINE(6) + 4, PROPSHEETPADDING(16), LABELLINE(1) + COMBOBOX IDC_REPEAT_DELAY_COMBO, PROPSHEETPADDING(4), LABELLINE(7) + 6, PROPSHEETWIDTH - PROPSHEETPADDING(6), LABELLINE(6), + CBS_DROPDOWNLIST | WS_VSCROLL | WS_VISIBLE | WS_TABSTOP + LTEXT "&Taxa de repetição:", -1, PROPSHEETPADDING(4), LABELLINE(9) + 6, PROPSHEETPADDING(16), LABELLINE(1) + COMBOBOX IDC_REPEAT_REPEAT_COMBO, PROPSHEETPADDING(4), LABELLINE(10) + 8, PROPSHEETWIDTH - PROPSHEETPADDING(6), LABELLINE(7), + CBS_DROPDOWNLIST | WS_VSCROLL | WS_VISIBLE | WS_TABSTOP + GROUPBOX "Teclas lentas", -1, PROPSHEETPADDING(1), LABELLINE(14), PROPSHEETWIDTH - PROPSHEETPADDING(2), LABELLINE(4) + 4 + LTEXT "&As teclas têm que ser mantidas pressionadas por:", -1, PROPSHEETPADDING(2), LABELLINE(15), PROPSHEETWIDTH - PROPSHEETPADDING(4), LABELLINE(1) + COMBOBOX IDC_REPEAT_WAIT_COMBO, PROPSHEETPADDING(2), LABELLINE(16) + 4, PROPSHEETWIDTH - PROPSHEETPADDING(4), LABELLINE(8), + CBS_DROPDOWNLIST | WS_VSCROLL | WS_VISIBLE | WS_TABSTOP + LTEXT "Ã&rea de teste:", -1, PROPSHEETPADDING(1), LABELLINE(20), PROPSHEETPADDING(8), LABELLINE(1) + EDITTEXT IDC_REPEAT_TEST_EDIT, PROPSHEETPADDING(10), LABELLINE(19) + 7, PROPSHEETWIDTH - PROPSHEETPADDING(11), 14, ES_AUTOHSCROLL + DEFPUSHBUTTON "OK", IDOK, PROPSHEETWIDTH - 111, PROPSHEETHEIGHT - 21, 50, 14 + PUSHBUTTON "Cancelar", IDCANCEL, PROPSHEETWIDTH - 57, PROPSHEETHEIGHT - 21, 50, 14 +END + +IDD_SERIALKEYSOPTIONS DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Configurações de dispositivos seriais" +FONT 8, "MS Shell Dlg" +BEGIN + GROUPBOX "Teclas seriais", -1, PROPSHEETPADDING(1), LABELLINE(1), PROPSHEETWIDTH - PROPSHEETPADDING(2), LABELLINE(10) + LTEXT "Escolha a porta para a conexão de um dispositivo de entrada alternativo.", + -1, PROPSHEETPADDING(2), LABELLINE(2), PROPSHEETWIDTH - PROPSHEETPADDING(4), LABELLINE(2) + LTEXT "&Porta serial:", -1, PROPSHEETPADDING(2), LABELLINE(3) + 5, PROPSHEETWIDTH - PROPSHEETPADDING(4), LABELLINE(2) + COMBOBOX IDC_SERIAL_PORT_COMBO, PROPSHEETPADDING(2), LABELLINE(4) + 7, PROPSHEETWIDTH - PROPSHEETPADDING(4), LABELLINE(6), + CBS_DROPDOWNLIST | WS_VSCROLL | WS_VISIBLE | WS_TABSTOP + LTEXT "&Taxa de transm.:", -1, PROPSHEETPADDING(2), LABELLINE(7), PROPSHEETWIDTH - PROPSHEETPADDING(4), LABELLINE(2) + COMBOBOX IDC_SERIAL_BAUD_COMBO, PROPSHEETPADDING(2), LABELLINE(8) + 2, PROPSHEETWIDTH - PROPSHEETPADDING(4), LABELLINE(8), + CBS_DROPDOWNLIST | WS_VSCROLL | WS_VISIBLE | WS_TABSTOP + DEFPUSHBUTTON "OK", IDOK, PROPSHEETWIDTH - 111, PROPSHEETHEIGHT - 21, 50, 14 + PUSHBUTTON "Cancelar", IDCANCEL, PROPSHEETWIDTH - 57, PROPSHEETHEIGHT - 21, 50, 14 +END + +STRINGTABLE +BEGIN + IDS_CPLSYSTEMNAME "Acessibilidade" + IDS_CPLSYSTEMDESCRIPTION "Ajustar as configurações do computador para visão, audição e mobilidade." + IDS_SENTRY_NONE "[Nenhuma]" + IDS_SENTRY_TITLE "Piscar a barra de legenda ativa" + IDS_SENTRY_WINDOW "Piscar a janela ativa" + IDS_SENTRY_DISPLAY "Piscar a área de trabalho" + IDS_SECONDS "Segundos" + IDS_MINUTES "Minutos" +END Propchange: trunk/reactos/dll/cpl/access/lang/pt-BR.rc ------------------------------------------------------------------------------ svn:eol-style = native
9 years, 1 month
1
0
0
0
← Newer
1
...
16
17
18
19
20
21
22
...
27
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
Results per page:
10
25
50
100
200