Commit Graph

517 Commits

Author SHA1 Message Date
Jacek Caban 44936abd84 oleaut32: Ensure that the right interface is passed to the callee in ITypeInfo::Invoke. 2012-08-20 20:17:30 +02:00
Jacek Caban 4a5eca88aa oleaut32: Use proper helpers for iface calls. 2012-07-27 17:05:27 +02:00
Alessandro Pignotti 25d6e9aee8 oleaut32: Avoid converting variants if it is not needed. 2012-03-16 13:02:49 +01:00
Huw Davies 0425a110d9 oleaut32: [restricted] members with negative dispids may still be called. 2012-02-07 09:34:22 -06:00
Nikolay Sivov a23dbc5dc5 oleaut32: Some tests for ITypeLib::FindName(), corrected parameter validation. 2012-01-26 21:27:59 +01:00
Hans Leidekker 110d96634b oleaut32: Handle negative offsets into the custom data table.
Fixes a crash in the Visio 2002 installer.
2012-01-17 13:59:03 +01:00
Frédéric Delanoy 7e309601f3 dlls: Assorted spelling fixes. 2011-08-03 14:15:50 +02:00
Andrew Eikum 22cc547156 oleaut32: Convert ITypeLibImpl to use standard linked list. 2011-03-16 16:31:54 +01:00
Andrew Eikum 3d03a5e239 oleaut32: Convert TLBImpLib to use standard linked list. 2011-03-16 16:31:54 +01:00
Andrew Eikum ec0a86002e oleaut32: Convert CustData to use standard linked lists. 2011-03-14 12:16:15 +01:00
Andrew Eikum 28fc129258 oleaut32: Use helper function to get CustData by GUID. 2011-03-14 12:16:04 +01:00
Andrew Eikum 517f5ba596 oleaut32: Convert TLBVarDesc to be stored as an array. 2011-03-11 11:44:12 +01:00
Andrew Eikum f76334fd3e oleaut32: Convert TLBImplType to be stored as an array. 2011-03-11 11:43:54 +01:00
Andrew Eikum 19fca2728b oleaut32: Convert TLBFuncDesc to be stored as an array. 2011-03-07 15:03:58 +01:00
Andrew Eikum b3e61a5661 oleaut32: Store ITypeInfoImpls in an array. 2011-03-07 15:03:13 +01:00
Huw Davies 060c8daf7f oleaut32: Mask off the lsb from the vtbl offset. This is set when the user specifies an offset in ICreateTypeInfo. 2011-02-24 15:49:27 +01:00
Nikolay Sivov a6de06aa4c oleaut32: Fix a couple of leaks on typeinfo release (Valgrind). 2011-01-24 14:43:28 +01:00
David Hedberg 900c5cde69 oleaut32: Make ITypeComp::BindType case-insensitive. 2011-01-11 16:05:46 +01:00
David Hedberg 454b1fca24 oleaut32: Handle NULL arguments to ITypeComp::BindType. 2011-01-11 16:05:45 +01:00
Nikolay Sivov ea3c215b57 oleaut32: Use VARENUM members instead of hardcoded values. 2011-01-04 14:55:41 +01:00
Nikolay Sivov 2e25e5e22c oleaut32: Use alloc/free helpers for typelib creation part too. 2011-01-04 14:53:50 +01:00
Nikolay Sivov ed749f51ce oleaut32: Use IDispatch vtable size instead of hardcoded value. 2011-01-04 14:52:52 +01:00
Nikolay Sivov b09fd556b0 oleaut32: Use implementation pointer to avoid casts. 2011-01-04 14:52:18 +01:00
Nikolay Sivov a90d2efd53 oleaut32: Use alloc/free helpers for all typelib parse methods. 2011-01-03 16:48:25 +01:00
Nikolay Sivov 8c8b5da9fc oleaut32: Update variable description and typeinfo size in ICreateTypeInfo2::SetVarHelpContext(). 2010-12-31 11:45:20 +01:00
Nikolay Sivov b3514b4718 oleaut32: Use function description layout instead of hardcoded byte offsets. 2010-12-28 16:35:39 +01:00
Nikolay Sivov 22022d13d1 oleaut32: Get rid of some magic offset values, use structure for that. 2010-12-27 11:50:38 +01:00
Nikolay Sivov 677302cf22 oleaut32: Move common define to a header. 2010-12-27 11:49:52 +01:00
Nikolay Sivov 6408679e44 oleaut32: Fix GetLibAttr for null argument, plus error handling. 2010-12-22 13:00:11 +01:00
Nikolay Sivov c395ae563e oleaut32: Basic parameter validation tests for some GetTypeInfo* methods. 2010-12-22 13:00:10 +01:00
Andrew Eikum c0f120db5d oleaut32: Search inherited interfaces again in ITypeComp::Bind. 2010-11-10 12:13:39 +01:00
Michael Stefaniuc ec382f4345 oleaut32: The function pointer should be const and not the return value. 2010-09-07 17:59:14 +02:00
Alexandre Julliard a0a4667fde oleaut32: Add tests for DispCallFunc and fix a number of corner cases. 2010-08-26 12:35:31 +02:00
Alexandre Julliard 21abfc5355 oleaut32: Implement DispCallFunc for x86_64. 2010-08-25 16:18:50 +02:00
Alexandre Julliard 3c380daa59 oleaut32: Simplify the i386 implementation of DispCallFunc. 2010-08-25 16:17:10 +02:00
Jacek Caban 7d7586d358 oleaut32: Try both SYS_WIN64 and SYS_WIN32 syskind in QueryPathOfRegTypeLib on win64. 2010-08-20 13:21:01 +02:00
Andrew Nguyen f2610a6109 oleaut32: Partially implement UnRegisterTypeLibForUser. 2010-07-30 14:59:42 +02:00
Andrew Nguyen f4fa417be9 oleaut32: Partially implement RegisterTypeLibForUser. 2010-07-30 14:59:41 +02:00
Huw Davies baef9a7e92 oleaut32: Don't invoke a function that has the restricted attribute or is part of an interface that's marked as restricted. 2010-07-29 17:33:36 +02:00
Alexandre Goujon 14db6a802c oleaut32/typelib: Fix ITypeInfo_Invoke with restricted keyword. 2010-07-20 12:35:51 +02:00
Andrew Eikum 3173305e88 oleaut32: Don't fail if member is missing in ITypeComp::Bind. 2010-07-19 14:38:17 +02:00
Michael Stefaniuc 0f82f68734 oleaut32: Avoid using long. 2010-05-10 13:46:08 +02:00
Alexandre Julliard 3681a28024 oleaut32: Query the path of the correct kind of typelib when unregistering it. 2010-04-09 11:14:16 +02:00
Alexandre Julliard e851556f6b oleaut32: Fix some pointer conversion warnings on 64-bit. 2010-04-07 14:25:02 +02:00
Vincent Povirk d9c01dcc40 oleaut32: Limit the number of arguments traced. 2010-04-07 13:50:28 +02:00
Huw Davies fbaaedd967 oleaut32: Only unregister those types that were registered. 2010-04-01 18:12:59 +02:00
Huw Davies adeba6ee80 oleaut32: Only oleautomation interfaces as well as all dispinterfaces should be registered. 2010-04-01 18:12:58 +02:00
Vincent Povirk 8ff7238ade oleaut32: Allow named args to be combined with positional args in fnInvoke. 2010-03-22 10:42:23 +01:00
Piotr Caban d2319ae841 oleaut32: Fix ITypeInfo GetImplTypeFlags for dispinterfaces. 2010-03-18 11:14:27 +01:00
Vincent Povirk 5893f3227c oleaut32: Always use DISPID_PROPERTYPUT to fill in the last argument. 2010-03-17 10:07:57 +01:00
Piotr Caban 914472ab81 oleaut32: Set parameter to NULL in GetMops stub. 2010-03-16 11:48:55 +01:00
Vincent Povirk da409d6a7b oleaut32: Return type mismatch errors in ITypeLibComp_fnBind. 2010-03-15 15:53:59 +01:00
Piotr Caban 2c911147b9 oleaut32: Fix crash in LoadTypeLib if typelib name is not specified. 2010-02-17 16:31:01 +01:00
Michael Stefaniuc ef7cafc11c oleaut32: Avoid using HIWORD on string pointers. 2010-02-10 14:33:27 +01:00
Rob Shearman 4f73fe3a09 oleaut32: Free the correct pointer on error in TLB_AllocAndInitVarDesc. 2009-11-29 16:42:20 +01:00
Rob Shearman 2a42f42951 oleaut32: Fix memory leak of name in ITypeLib2_Constructor_MSFT. 2009-11-19 14:24:11 +01:00
Rob Shearman 8a5886efad oleaut32: Fix circular reference counting in typelibs/typeinfos.
Do not rely on the reference count of ITypeInfo's to go to zero to
delete them. Instead only rely on the parent typelib's reference
count, but update the parent typelib's reference count based on
whether each typeinfo has a valid reference.
2009-11-19 14:24:05 +01:00
Rob Shearman 99d9983b61 oleaut32: Fix memory leaks in ITypeInfo_fnInvoke. 2009-11-18 11:15:39 +01:00
Sunil Mohan Adapa 59ae1705ac oleaut32: Do no check for dispatchable flag on dual interfaces. 2009-11-10 15:18:06 +01:00
Sunil Mohan Adapa 926b884cd6 oleaut32: Fix SLTG parser so that dual interfaces are returned as IDispatch first. 2009-11-10 15:18:05 +01:00
Sunil Mohan Adapa 05b2426031 oleaut32: Fix SLTG parser so that dispatch interface can inherit another interface. 2009-11-10 15:18:05 +01:00
Jeremy White b8d7088e88 oleaut32: Implement the ability to marshall VT_CARRAY's of user defined types. 2009-10-26 11:19:12 +01:00
Alexandre Julliard ceac768adf oleaut32: Use an assembly wrapper to implement DispCallFunc, and make it i386-only. 2009-10-06 16:12:35 +02:00
Vincent Povirk 03683b2530 oleaut32: Use DISPATCH_HREF_MASK even for non-dual dispatch types. 2009-09-16 15:36:35 -05:00
Vincent Povirk 9abdf54cb7 oleaut32: Implement ITypeLibComp::BindType. 2009-09-10 10:50:22 +02:00
Vincent Povirk 34f1d8a200 oleaut32: Handle LCID arguments in ITypeInfo::Invoke. 2009-09-02 15:48:14 +02:00
Austin English e7bbc32bd1 oleaut32: Avoid a NULL pointer dereference. 2009-09-01 12:52:05 +02:00
Vincent Povirk 80c870251f oleaut32: Make ITypeInfo2::GetCustData succeed when data is not found. 2009-08-26 12:09:25 +02:00
Vincent Povirk 3e542bc60e oleaut32: Map INT and UINT typedesc's to VT_I4 and VT_UI4. 2009-08-20 15:25:54 +02:00
Sunil Mohan f7f50d1252 oleaut32: Fix SLTG_ReadString to null terminate. 2009-08-18 11:25:44 +02:00
Alexandre Julliard 8fce9369b8 oleaut32: Replace long and unsigned long by more appropriate types. 2009-07-03 13:48:54 +02:00
Huw Davies 9da0b352f6 oleaut32: TLibAttr.lcid is read from the second lcid field in the header. Confirmed by manually editing a tlb file. 2009-06-09 17:01:15 +02:00
Alexandre Julliard 9955350ea1 oleaut32: Add support for registering 64-bit typelibs. 2009-05-21 16:17:19 +02:00
Dmitry Timoshkov 69ec6b4c6d oleaut32: Add some additional tests for QueryPathOfRegTypeLib, make them pass under Wine. 2009-04-13 17:35:51 -05:00
Alexandre Julliard 0ed1041c63 oleaut32: Don't use 16-bit headers. 2009-04-01 18:20:21 +02:00
Michael Stefaniuc a3f8fd71e1 oleaut32: Remove superfluous pointer casts. 2009-02-09 14:37:23 +01:00
Marcus Meissner 4d8fffb24b oleaut32: Removed useless NULL ptr check (Coverity). 2009-02-02 15:21:43 +01:00
Rob Shearman 522662faa9 oleaut32: Fix the typelib tests on 64-bit platforms. 2009-01-29 14:06:59 +01:00
Rob Shearman b3c8124a15 oleaut32: Dump MSFT format typeinfos upon loading. 2009-01-12 13:07:01 +01:00
Alexandre Julliard c42130f010 oleaut32: Make some functions static. 2008-12-02 15:24:59 +01:00
Francois Gouget cc42922e08 oleaut32: Remove WINAPI on static functions where not needed. 2008-11-26 12:10:40 +01:00
Huw Davies 49368cb14b oleaut32: Add support for loading typelibs from NE files. 2008-11-26 12:08:23 +01:00
Andrew Talbot 5af3af2b2f oleaut32: Sign-compare warnings fix. 2008-11-03 14:06:07 +01:00
Michael Stefaniuc 0c07d3ba37 oleaut32: Use FAILED instead of !SUCCEEDED. 2008-10-08 13:43:22 +02:00
Detlef Riekenberg 410302d898 oleaut32: Remove redundant NULL check before SysFreeString. 2008-09-23 12:12:29 +02:00
Huw Davies fd3be66531 oleaut32: Use V_INT instead of V_UNION. 2008-09-16 11:28:53 +02:00
Huw Davies fbcd6422ef oleaut32: Add support for VT_INT and VT_UINT constants. 2008-09-16 11:28:50 +02:00
Mikołaj Zalewski 8b36e71590 oleaut32: Make _argsize and _xsize receive the full TYPEDESC and parent ITypeInfo, use a different function in IDispatch code. 2008-09-15 13:20:10 +02:00
Marcus Meissner 96412ee564 Annotate with allocation size attribute. 2008-09-05 11:22:26 +02:00
Rob Shearman fc269433ce oleaut32: Fix invalid free of import library entry name with SLTG typelibs.
Use TLB_MultiByteToBSTR to allocate import library entry name in
ITypeLib2_Constructor_MSFT as BSTR instead of a normal block of memory
to make the allocator the same as for SLTG typelibs. Free the name
with SysFreeString instead of TLB_Free.
2008-08-18 14:36:58 +02:00
Rob Shearman 2fab79955f oleaut32: Avoid unnecessary allocations in TLB_MultiByteToBSTR and SLTG_ReadString. 2008-08-18 14:36:51 +02:00
Rob Shearman 6f9baca256 oleaut32: Fix the loading of the parameter name for SLTG propget functions.
The parameter could have an offset of 0xffff/0xfffe, in which case the
parameter name should be the name of the function, rather than NULL.
2008-07-30 14:41:57 +02:00
Rob Shearman 9f9d8dc683 oleaut32: Handle strings with a length of 0xffff in SLTG_DoVars.
This means that the string is NULL so don't attempt to access the
string data in this case.
2008-07-30 14:41:47 +02:00
Rob Shearman caf875f4ee oleaut32: Dump the loaded module in SLTG_ProcessModule. 2008-07-30 14:41:37 +02:00
Rob Shearman 0ed6ebfec1 oleaut32: Move the debug logging of the variable type in SLTG_DoVars.
Move it before loading of the constant data to allow better debugging
of problems during the processing of loading the constant data.
2008-07-30 14:41:32 +02:00
Rob Shearman 48c5a06916 oleaut32: Use the typelib debug channel for debug messages output during loading of SLTG typelibs. 2008-07-30 14:41:22 +02:00
Andrew Talbot 3ac0983ab4 oleaut32: Remove unneeded address-of operators from array names. 2008-07-11 14:06:37 +02:00
Rob Shearman 501da4fa2a oleaut32: Dump symbolic names for VT_LPSTR and VT_LPWSTR in dump_TypeDesc. 2008-07-01 12:26:22 +02:00
Rob Shearman a2c1bdf1f8 oleaut32: Load string constants correctly from SLTG typelibs. 2008-07-01 12:26:17 +02:00
Rob Shearman 45989a1ff1 oleaut32: Implement the 0x08 flag in SLTG_DoVars.
It means that the data is stored directly in pItem->byte_offs instead
of the byte offset pointed to by it.
2008-07-01 12:26:11 +02:00
Austin English c531e2abdb Spelling fixes. 2008-04-23 12:31:07 +02:00
Andrew Talbot ba742868e5 oleaut32: Remove unused variables. 2008-04-23 12:23:27 +02:00
Austin English e8dbd66c23 oleaut32: Spelling fixes. 2008-04-14 21:28:38 +02:00
Francois Gouget 8a18e0e43a Assorted spelling fixes. 2008-04-07 13:36:18 +02:00
Rob Shearman a35dfc4510 oleaut32: Fix the return type of TLB_ReadTypeLib. 2008-03-15 10:58:38 +01:00
Rob Shearman 0ec1e2842a oleaut32: Split the methods for opening different sources of typelibs out of TLB_ReadTypeLib. 2008-03-12 19:21:15 +01:00
Andrew Talbot 9d16a42210 oleaut32: Assign to structs instead of using memcpy. 2008-03-12 11:59:27 +01:00
Andrew Talbot 5ea25c62b8 oleaut32: Remove unneeded casts. 2008-01-16 12:16:01 +01:00
Rob Shearman e68371040f oleaut32: Introduce a new helper function, TLB_FreeCustData, for freeing custom data.
Fix memory leaks caused by the variable and interface custom data not 
being freed properly.
2007-11-28 11:14:13 +01:00
Rob Shearman aaa6c4007f oleaut32: Free the correct custom data inside ITypeInfo_fnRelease.
Since the code is inside the loop for function data, it should be 
freeing the function's custom data, not the interface's.
2007-11-28 11:14:07 +01:00
Gerald Pfeifer 48d839822b oleaut32: Simplify two conditions based on the fact that unsigned variables cannot be negative. 2007-11-26 13:55:18 +01:00
Francois Gouget c4b1195c0c Assorted spelling fixes. 2007-10-23 18:20:27 +02:00
Mikolaj Zalewski bda66cc37a oleaut32: Function kind for dispatch interfaces should be FUNC_DISPATCH. 2007-10-10 21:33:38 +02:00
Andrew Talbot 4ed64d381c oleaut32: Constify some variables. 2007-07-31 22:24:46 +02:00
Andrew Talbot 36720b4945 oleaut32: Constify some variables. 2007-07-30 13:38:39 +02:00
Huw Davies ec35568970 oleaut32: Extend _invoke to cope with more args. 2007-06-25 11:34:49 +02:00
Huw Davies 17fca45d41 oleaut32: Interfaces that derive from IDispatch should be marshaled as VT_DISPATCH. 2007-06-25 11:34:23 +02:00
Michael Stefaniuc 34b45b311e oleaut32: Do not use wide character constants. 2007-06-22 12:18:50 +02:00
Misha Koshelev 428ed94fa9 oleaut32: Add support for vararg functions in ITypeInfo::Invoke. 2007-06-07 13:00:09 +02:00
Rob Shearman e98ec6db4c oleaut32: Fix the references in function descriptions returned for dual IDispatch interfaces.
Do this by changing references from other interfaces (and possibly other 
typelibs) to uniquely identify them.

Add special handling to GetRefTypeInfo to cope with this.
2007-05-30 11:51:54 +02:00
Rob Shearman bacf5c640f oleaut32: For automatic-value-getting in ITypeInfo::Invoke, it doesn't matter what flag(s) the function was executed with, just what type of function is being invoked. 2007-05-30 11:51:37 +02:00
Huw Davies cd3df383a5 oleaut32: SLTG references are only unique at the typeinfo level, so convert them to be unique to the typelib. 2007-05-25 19:37:12 +02:00
Huw Davies c1e89400aa oleaut32: Recurse through the impltype list so that dispinterfaces get the correct parents. 2007-05-18 19:59:35 +02:00
Huw Davies b698b2909b oleaut32: Fix CreateDispTypeInfo to store the correct number of functions. 2007-05-18 19:59:29 +02:00
Huw Davies 78bf6946ba oleaut32: GetRefTypeOfImplType(0) on TKIND_DISPATCH typeinfos should always return an href to IDispatch. 2007-05-18 19:57:34 +02:00
Huw Davies 356970e529 oleaut32: Fix return value in the element not found case. 2007-05-18 19:57:25 +02:00
Huw Davies 9afcaf2ae1 oleaut32: Type references are global to the typelib. 2007-05-17 12:44:44 +02:00
Rob Shearman 5edc7fd5ef oleaut32: TKIND_COCLASS parameters to Invoke'd functions should be converted into VT_DISPATCH instead of VT_UNKNOWN.
Add a test for this.
2007-03-08 13:50:45 +01:00
Rob Shearman 30b6f9acd6 oleaut32: Fix the return value of ITypeInfo::Invoke when the property-put named argument isn't DISPID_PROPERTYPUT. 2007-02-08 12:59:36 +01:00
Rob Shearman a3235dd1d4 oleaut32: Implement automatic value getting in ITypeInfo::Invoke.
If an IDispatch object is returned from in the retval for a propget 
function and an extra parameter was passed in to ITypeInfo::Invoke then 
it should call IDispatch::Invoke on the returned object with the extra 
parameter to retrieve the value of the object, which is then returned in 
pVarResult.
2007-02-08 12:59:32 +01:00
Rob Shearman e88d033044 oleaut32: Ignore the first named argument when invoking property-put methods
as it is mandatory and doesn't indicate that the arguments will be
passed in as named ones.
2007-02-06 22:06:16 +01:00
Rob Shearman 21140a9a53 oleaut32: Add support for named arguments in ITypeInfo::Invoke. 2007-02-06 22:05:59 +01:00
Rob Shearman 702e2c6dc2 oleaut32: Copy the value directly returned from the called function
if it is not an HRESULT value, instead of getting it from a [retval]
attribute.
2007-02-06 22:05:50 +01:00
Rob Shearman 8f38cd8c8c oleaut32: Fix the missing argument handling for non-byref variant arguments. 2007-02-06 21:36:34 +01:00
Rob Shearman e2108feec4 oleaut32: If an error info object was created when the invoked method failed then fill in exception info from the error info object. 2007-02-06 21:36:13 +01:00
Huw Davies a09cd1b88a oleaut32: Call SearchPath before LoadLibrary so that we get the full path of native exes and dlls.
For builtin dlls prepend the system directory.
2007-02-06 20:23:16 +01:00
Huw Davies a59e4899f5 oleaut32: The typelib version numbers should be written to the registry in hex. 2007-01-25 11:05:46 +01:00
Andrew Talbot d6fc116475 oleaut32: Declare some items static. 2007-01-22 12:08:55 +01:00
Dmitry Timoshkov 601bf6ea12 oleaut32: Make some data const and static. 2006-11-28 12:36:20 +01:00
Alex Villacís Lasso 64410e5907 oleaut32: typelib - fix regression in MSFT typelib parsing. 2006-11-09 10:44:13 +01:00
Francois Gouget 30e44c85c8 Assorted spelling fixes. 2006-11-07 15:25:24 +01:00
Rob Shearman 7f71545835 oleaut32: Update comments at the top of typelib.c and remove "stub" from several traces that are in implemented functions. 2006-10-27 11:59:50 +02:00
Rob Shearman 47bf80da8c oleaut32: Fix a crash in dump_DispParms when running the typelib test with debug tracing on. 2006-10-24 17:46:56 +02:00
Rob Shearman aa203f0919 oleaut32: Free the array subscript memory for type descriptions when freeing the typelib. 2006-10-24 17:46:49 +02:00
Rob Shearman a26af4861d oleaut32: Fix a reference count leak in CreateDispTypeInfo. 2006-10-24 17:46:34 +02:00
Rob Shearman d72ef78fa6 oleaut32: Initialise all members of the FUNCDESC structure in CreateDispTypeInfo. 2006-10-24 17:46:27 +02:00
Rob Shearman 053b6b21b6 oleaut32: Fix two more leaks on type info destruction. 2006-10-23 15:19:02 +02:00
Rob Shearman b5c78d0dff oleaut32: Rewrite MSFT_ReadName and MSFT_ReadString to need one less allocation and to fix a memory leak. 2006-10-23 15:18:56 +02:00
Rob Shearman b3d024a7bb oleaut32: Free allocated memory on typelib and typeinfo destruction. 2006-10-23 15:18:38 +02:00
Dmitry Timoshkov 20c40e0659 oleaut32: Make QueryPathOfRegTypeLib test pass under Wine. 2006-10-23 15:16:55 +02:00