Author: tkreuzer
Date: Tue Jun 21 13:22:07 2011
New Revision: 52401
URL:
http://svn.reactos.org/svn/reactos?rev=52401&view=rev
Log:
[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
Added:
trunk/reactos/dll/win32/oleaut32/msvc.S (with props)
Modified:
trunk/reactos/dll/win32/oleaut32/CMakeLists.txt
trunk/reactos/dll/win32/oleaut32/typelib2.c
Modified: trunk/reactos/dll/win32/oleaut32/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/oleaut32/CMakeLi…
==============================================================================
--- trunk/reactos/dll/win32/oleaut32/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/oleaut32/CMakeLists.txt [iso-8859-1] Tue Jun 21 13:22:07 2011
@@ -1,3 +1,24 @@
+
+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
@@ -25,32 +46,12 @@
${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})
Added: trunk/reactos/dll/win32/oleaut32/msvc.S
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/oleaut32/msvc.S?…
==============================================================================
--- trunk/reactos/dll/win32/oleaut32/msvc.S (added)
+++ trunk/reactos/dll/win32/oleaut32/msvc.S [iso-8859-1] Tue Jun 21 13:22:07 2011
@@ -1,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
Propchange: trunk/reactos/dll/win32/oleaut32/msvc.S
------------------------------------------------------------------------------
svn:eol-style = native
Modified: trunk/reactos/dll/win32/oleaut32/typelib2.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/oleaut32/typelib…
==============================================================================
--- trunk/reactos/dll/win32/oleaut32/typelib2.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/oleaut32/typelib2.c [iso-8859-1] Tue Jun 21 13:22:07 2011
@@ -1780,7 +1780,7 @@
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;