[OLEAUT32]

- add assembly version of call_method for MSVC
- fix a syntax error (sizeof(int[3]) is not valid C)
- move definitions to the top of the CMakeLists.txt

svn path=/trunk/; revision=52401
This commit is contained in:
Timo Kreuzer 2011-06-21 13:22:07 +00:00
parent 2b116b187c
commit 033ddb3799
3 changed files with 58 additions and 27 deletions

View file

@ -1,4 +1,25 @@
remove_definitions(-D_WIN32_WINNT=0x502)
add_definitions(-D_WIN32_WINNT=0x600)
add_definitions(-DPROXY_CLSID_IS="{0xb196b286,0xbab4,0x101a,{0xb6,0x9c,0x00,0xaa,0x00,0x34,0x1d,0x07}}")
add_definitions(
-D__WINESRC__
-DCOM_NO_WINDOWS_H
-D_OLEAUT32_
-DPROXY_DELEGATION
-DREGISTER_PROXY_DLL
-DENTRY_PREFIX=OLEAUTPS_)
include_directories(
${REACTOS_SOURCE_DIR}/include/reactos/libs/libjpeg
${REACTOS_SOURCE_DIR}/include/reactos/wine)
spec2def(oleaut32.dll oleaut32.spec)
add_rpcproxy_files(oleaut32_oaidl.idl oleaut32_ocidl.idl)
list(APPEND SOURCE
connpt.c
dispatch.c
@ -25,32 +46,12 @@ list(APPEND SOURCE
${CMAKE_CURRENT_BINARY_DIR}/oleaut32_ocidl_p.c
${CMAKE_CURRENT_BINARY_DIR}/oleaut32.def)
remove_definitions(-D_WIN32_WINNT=0x502)
add_definitions(-D_WIN32_WINNT=0x600)
add_definitions(-DPROXY_CLSID_IS="{0xb196b286,0xbab4,0x101a,{0xb6,0x9c,0x00,0xaa,0x00,0x34,0x1d,0x07}}")
add_definitions(
-D__WINESRC__
-DCOM_NO_WINDOWS_H
-D_OLEAUT32_
-DPROXY_DELEGATION
-DREGISTER_PROXY_DLL
-DENTRY_PREFIX=OLEAUTPS_)
if(MSC)
# seems to work, but is this correct ?
# <compilerflag compilerset="msc">/FIwine/typeof.h</compilerflag>
add_definitions(/FIwine/typeof.h)
endif(MSC)
include_directories(
${REACTOS_SOURCE_DIR}/include/reactos/libs/libjpeg
${REACTOS_SOURCE_DIR}/include/reactos/wine)
spec2def(oleaut32.dll oleaut32.spec)
add_rpcproxy_files(oleaut32_oaidl.idl oleaut32_ocidl.idl)
if(MSVC)
set_source_files_properties(${REACTOS_BINARY_DIR}/include/psdk/wincodec_i.c PROPERTIES GENERATED TRUE)
list(APPEND SOURCE
${REACTOS_BINARY_DIR}/include/psdk/wincodec_i.c
msvc.S)
endif()
add_library(oleaut32 SHARED ${SOURCE})

View file

@ -0,0 +1,30 @@
#include <asm.inc>
.code32
PUBLIC _call_method
_call_method:
push ebp
mov ebp, esp
push esi
push edi
mov edx, dword ptr ds:[ebp + 12]
shl edx, 2
jz cm1
sub esp, edx
and esp, HEX(0FFFFFFF0)
mov ecx, dword ptr ds:[ebp + 12]
mov esi, dword ptr ds:[ebp + 16]
mov edi, esp
cld
rep movsd
cm1:
call dword ptr ds:[ebp + 8]
lea esp, [ebp - 8]
pop edi
pop esi
pop ebp
ret
END

View file

@ -1780,7 +1780,7 @@ static HRESULT WINAPI ICreateTypeInfo2_fnAddFuncDesc(
insert = HeapAlloc(GetProcessHeap(), 0, sizeof(CyclicList));
if(!insert)
return E_OUTOFMEMORY;
insert->u.data = HeapAlloc(GetProcessHeap(), 0, sizeof(int[6])+sizeof(int[(num_defaults?4:3)])*pFuncDesc->cParams);
insert->u.data = HeapAlloc(GetProcessHeap(), 0, sizeof(int)*6+sizeof(int)*(num_defaults?4:3)*pFuncDesc->cParams);
if(!insert->u.data) {
HeapFree(GetProcessHeap(), 0, insert);
return E_OUTOFMEMORY;