oleaut32: SysStringLen code clean up.
This commit is contained in:
parent
13db9a1662
commit
7fded88895
|
@ -152,18 +152,7 @@ static DWORD *alloc_bstr(size_t size)
|
|||
*/
|
||||
UINT WINAPI SysStringLen(BSTR str)
|
||||
{
|
||||
DWORD* bufferPointer;
|
||||
|
||||
if (!str) return 0;
|
||||
/*
|
||||
* The length of the string (in bytes) is contained in a DWORD placed
|
||||
* just before the BSTR pointer
|
||||
*/
|
||||
bufferPointer = (DWORD*)str;
|
||||
|
||||
bufferPointer--;
|
||||
|
||||
return (int)(*bufferPointer/sizeof(WCHAR));
|
||||
return str ? *((DWORD*)str-1)/sizeof(WCHAR) : 0;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
|
|
Loading…
Reference in New Issue