UINT WINAPI SysStringByteLen(BSTR bstr) { if(NULL != bstr) return *(UINT*)((BYTE*)bstr-4) else return 0; }