Commit Graph

549 Commits

Author SHA1 Message Date
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
Francois Gouget ef998ea6cb Assorted spelling fixes. 2006-10-16 11:33:38 +02:00
Michael Stefaniuc 15765dd953 The Data1 member of the GUID struct needs to be an unsigned int too for Win64 compatibility. 2006-10-16 10:53:04 +02:00
Hans Leidekker ce66f5d684 oleaut32: Win64 printf format warning fixes. 2006-10-13 12:08:47 +02:00
Huw Davies 03ec218326 oleaut32: Implement ITypeInfo_CreateInstance. 2006-10-09 20:38:41 +02:00
Robert Shearman dd70c0ae7c oleaut32: Fix ITypeInfo::GetFuncDesc to return the correct information for dual dispinterfaces. 2006-10-02 21:38:12 +02:00
Robert Shearman 65ca6a2f4d oleaut32: Make ITypeInfo::GetDocumentation work for functions/variables in inherited interfaces. 2006-10-02 21:38:07 +02:00
Andrew Talbot 0e9c97eba3 oleaut32: Cast-qual warnings fix. 2006-09-25 18:15:39 +02:00
Robert Shearman b7e88d8f8b oleaut32: Fix a leak of the module reference count. 2006-09-07 10:16:47 +02:00
Benjamin Arai d1282dce88 oleaut32: Add support for handling TKIND_COCLASS in userdefined_to_variantvt. 2006-08-22 12:00:01 +02:00
Stefan Siebert 9776f5b83f oleaut32: GetTypeInfoType - Return TYPE_E_ELEMENTNOTFOUND if index out of bounds. 2006-08-03 19:56:22 +02:00
Robert Shearman 40556ae08f oleaut32: Improve dump_DispParms. 2006-07-31 21:27:29 +02:00
Robert Shearman 33582cc69e oleaut32: Add some validation for the DISPPARAMS structure in ITypeInfo::Invoke. 2006-07-31 21:25:44 +02:00
Robert Shearman eb885a750f oleaut32: Initialize pRetVal in ITypeInfo::Invoke before calling VariantCopyInd
as native doesn't assume that it doesn't contain valid data.
2006-07-24 13:46:57 +02:00
Robert Shearman ad6b0dc281 oleaut32: Revert check for FUNCFLAG_FRESTRICTED in ITypeInfo::Invoke.
The change caused regressions in a number of applications and needs more 
study to see what the correct behaviour should be.
2006-07-18 11:12:35 +02:00
Robert Shearman 31f640274f oleaut32: Don't execute a function in ITypeInfo::Invoke if it has the FUNCFLAG_FRESTRICTED flag.
Add some more tests for ITypeInfo::Invoke.
2006-07-14 12:39:02 +02:00
Robert Shearman f9c9a2bf3d oleaut32: Convert void return types to the VT_EMPTY variant type in ITypeInfo::Invoke. 2006-07-13 16:26:19 +02:00
Robert Shearman 797bdbc2d9 oleaut32: Typelib interfaces with the FDUAL flag should also be registered,
since dispinterfaces don't have the FDISPATCHABLE flag.
2006-07-13 16:26:12 +02:00
Robert Shearman 688c6a78f1 oleaut32: MSFT_DoFuncs: "reclength" of the function information record is stored
in a 16 bit int and not in a 8 bit int as previously supposed, using a 0x1ff
mask. Upper 16 bits contains the ordinal number of the function. 
Allocation of the "recbuf" must be modified, to support larger data
(based on a patch by White Snake <whitesnake78@mail.com>).
2006-07-10 11:53:03 +02:00
Robert Shearman ef7b6e2740 oleaut32: ITypeComp_fnBind should do case-insensitive compares on the name passed in. 2006-07-07 13:31:43 +02:00
Robert Shearman dd677948b4 oleaut32: Fix the error code returned by ITypeComp on an interface when the name matches, but the flags don't. 2006-07-07 13:30:46 +02:00
Robert Shearman 65639ab722 oleaut: Implement processing of modules for SLTG typelibs.
Set funckind when processing SLTG functions.
2006-07-05 11:48:41 +02:00
Robert Shearman 3f97460c2b oleaut: Improve SLTG var support.
Pass both the start of the block and the offset to the first item into
SLTG_DoVars as they may be different.
Process 0xfffe offsets for variable names - this means to use the
previous name.
Add support for parsing the optional varflags field.
2006-07-05 11:48:29 +02:00
Robert Shearman 4b6b51ae99 oleaut: Fix function support for SLTG dispinterfaces. 2006-07-05 11:48:13 +02:00
Robert Shearman f2eb2d2309 oleaut: Move the processing of functions in SLTG typelibs into a
separate function and use it when processing dispinterfaces.
2006-07-05 11:48:03 +02:00
Robert Shearman 8a50262fdb oleaut: Move the initialisation of memidConstructor and
memidDestructor of type infos to the common ITypeInfo creation
function.

Remove the WARN message as this functionality isn't implemented in
native either.
2006-07-05 11:47:52 +02:00
Robert Shearman 92b468e810 oleaut: Process references for SLTG dispatch types. 2006-07-05 11:46:20 +02:00
Robert Shearman e4188e8846 oleaut: Abstract out the processing of variables in SLTG typelib components to a common function. 2006-07-05 11:46:07 +02:00
Robert Shearman bc6acf5c1d oleaut: Process references when parsing SLTG alias types. 2006-07-05 11:45:35 +02:00
Robert Shearman 23e089a09f oleaut: Rename SLTG_DoType to SLTG_DoElem and split out the common TYPEDESC generating code to SLTG_DoType.
Process SLTG alias types with SLTG_DoType as the data is stored in the
same format as in other components of the typelib.
2006-07-05 11:45:22 +02:00
Robert Shearman 663fb8bd56 oleaut: The SLTG_MemberHeader and SLTG_TypeInfoTail structures are
common to all elements, so move the processing of these from the
individual element processing.

Improve SLTG alias processing.
2006-07-05 11:45:08 +02:00
Robert Shearman 283049b8fc oleaut: Document some more members of SLTG_TypeInfoTail. 2006-07-05 11:44:33 +02:00
Robert Shearman 2fa3cc03a5 oleaut32: Fix a typo where the FIXME doesn't match the code. 2006-06-30 20:43:56 +02:00
Robert Shearman 166a91b12d oleaut32: RegisterTypeLib should register any interface that derives
from IDispatch rather than just dual interfaces.

This is hinted at, although not explicitly stated on MSDN, but was 
verified by tests with native oleaut32.
2006-06-29 14:40:01 +02:00
Juan Lang 24dd931a56 oleaut32: Handle bstr length of -1 in typelibs. 2006-06-28 16:53:28 +02:00
Alexandre Julliard 707060913c oleaut32: Use the standard DEFINE_OLEGUID macro to define GUIDs. 2006-06-09 21:09:35 +02:00
James Hawkins 585763ffa9 oleaut32: Only BYREF DispCallFunc args whose input args are not BYREF should be changed. 2006-06-06 11:46:14 +02:00
James Hawkins 0e5bd51d28 oleaut32: Copy BYREF args directly if they have the same variant type. 2006-06-06 11:46:03 +02:00
Robert Shearman 9c738061e0 oleaut32: Make sure to read the memid and the name offset from the
correct offsets, after the function data, so add cFuncs to the offsets
in MSFT_DoVars.

Resolve referenced types for variables.
Fixes initialisation of the dbgrid32 OCX.
2006-05-31 15:48:07 +02:00
Robert Shearman 983ad4accd oleaut32: Resolve referenced types for return values as well as parameters in MSFT typelibs. 2006-05-31 15:47:55 +02:00
Jonathan Ernst 360a3f9142 Update the address of the Free Software Foundation. 2006-05-23 14:11:13 +02:00
Robert Shearman 6c6ce70260 oleaut32: Check the return value from VariantCopy when copying values
for VT_VARIANT typed parameters for ITypeInfo::Invoke.
2006-05-05 21:51:11 +02:00
Robert Shearman 5e8c877f96 oleaut32: Support values being passed into VT_VARIANT|VT_BYREF typed parameters in ITypeInfo::Invoke. 2006-05-05 21:50:58 +02:00
Mike McCormack e0276035a4 oleaut32: Remove unnecessary check for NULL. 2006-04-07 11:46:04 +02:00
Robert Shearman 11c83c5d5e oleaut32: Zero out parameter in LoadRegTypeLib in case of failure. 2006-03-30 12:43:38 +02:00
Robert Shearman 4b19449b6b oleaut: ITypeInfo::GetIDsOfNames should search inherited interfaces
regardless of what type they are.

Add a test for this and dump type infos created with CreateDispTypeInfo.
2006-03-21 20:02:11 +01:00
Robert Shearman 264b122d52 oleaut: Better support for invoking methods with VT_VARIANT argument types. 2006-03-21 16:19:06 +01:00
Robert Shearman 1ce38682fb oleaut32: Fix returning Typelib file name.
We can't use GetModuleFileName on a resource-only module, so the best
we can do is to copy the original name we used to find the type
library.  Fix a couple of places where we were incorrectly using the
file name, rather than the path.
2006-02-14 11:33:40 +01:00
Robert Shearman 265f042801 oleaut: Fix importing the IDispatch interface for TKIND_DISPATCH type infos.
Fix importing the IDispatch interface for TKIND_DISPATCH type infos
when the offset isn't specified. It should be fetched from the
dispatch offset stored in the header, rather than using a hack that
doesn't work.
2006-02-10 14:50:53 +01:00
Robert Shearman a633e22bdd oleaut: Make TLB_ReadTypeLib not rely on the signature of executables or dlls.
Try loading the dll first and then fall back to the regular file case.
Only call SearchPath for the regular file case since LoadLibraryEx
will do this for us and it previously excluded builtin dlls and
executables from having their type libraries opened.
2006-02-09 12:11:54 +01:00
Robert Shearman 19b6046e21 oleaut: Move the call to SearchPath inside of TLB_ReadTypeLib. 2006-02-09 12:11:01 +01:00
Robert Shearman 00ecbd05e8 oleaut: Revert incorrect patch changing the order of parameters passed
into DispCallFunc. A test with native indeed shows that the parameter
index increases from the leftmost parameter to the rightmost.
2006-02-09 12:10:26 +01:00
Huw Davies 7000aca824 oleaut32: Fixes and tests for CreateDispTypeInfo.
CreateDispTypeInfo returns the typeinfo of a coclass which implements
the described interface.
2006-02-06 20:57:09 +01:00
Huw Davies 16cc1858d0 ole: Initialize a few more funcdesc members in CreateDispTypeInfo. 2006-02-03 12:29:39 +01:00
Robert Shearman 61708da1c8 oleaut: Dump the pointer for VT_ARRAY/VT_VECTOR typed variants. 2006-01-31 12:21:27 +01:00
Robert Shearman be13d154c6 oleaut: Fix the order of parameters passed into DispCallFunc. 2006-01-30 14:55:57 +01:00
Robert Shearman 1f04fc6a49 oleaut: Handle a non-byref variant being passed for a byref param in
ITypeInfo::Invoke.
2006-01-16 20:44:13 +01:00
Robert Shearman d86f8d2ef2 oleaut: Only allocate memory once for each array needed for the
arguments in ITypeInfo::Invoke.
2006-01-16 20:43:55 +01:00
Robert Shearman 0f8db3feca oleaut: Simplify missing argument handling in ITypeInfo::Invoke.
Simplify missing argument handling by pre-allocating an array of the
maximum number of missing arguments there could be.
2006-01-16 20:43:20 +01:00
Robert Shearman 1616f81d00 oleaut: Add const attribute to iterators in get functions. 2006-01-14 17:48:12 +01:00
Robert Shearman 0b2c0d8365 oleaut: Initialise more fields in CreateDispTypeInfo.
Don't leave some of the fields of the TLBFuncDesc structure
uninitialised in CreateDispTypeInfo.
2006-01-14 17:47:36 +01:00
Robert Shearman 9227902714 oleaut: Support conversion of VT_SAFEARRAY into VT_ARRAY|type.
Typelib variant types that cannot be converted should return
DISP_E_BADVARTYPE.
Don't call DispCallFunc if conversion of one of the arguments failed.
2006-01-12 11:53:47 +01:00
Marcus Meissner cf173911a3 ole: ITypeInfo::Invoke stack overwrite fix.
Have enough stack space up to even VT_VARIANTs, fixes a stack
corruption.
2006-01-11 20:55:07 +01:00
Robert Shearman d2bdbd4ea5 ole: Remove the no longer used _copy_arg function. 2006-01-06 21:16:21 +01:00
Robert Shearman 8cf5373f60 ole: ITypeInfo::Invoke rewrite.
Re-implement ITypeInfo::Invoke on top of DispCallFunc and
VariantChangeType instead of _invoke and _copy_arg.
2006-01-06 21:15:48 +01:00
Mike McCormack 98ed3fa553 oleaut32: Output a FIXME message only once. 2006-01-06 12:16:58 +01:00
Dan Kegel d69366a171 oleaut32: Allow _invoke to handle up to 23 parameters. 2006-01-05 13:41:35 +01:00
Robert Shearman 83ff8560c3 ole: Store the result from _invoke in a VARIANTARG structure. 2006-01-05 12:18:54 +01:00
Mike McCormack 8193d97bfd oleaut32: Allow _invoke to handle up to 17 parameters. 2006-01-03 12:11:44 +01:00
Robert Shearman e6fa361967 oleaut: Small re-organisation of ITypeInfo::Invoke.
Only output the one function in the trace for ITypeInfo::Invoke.
Process the return value on output in ITypeInfo::Invoke, but only copy
it to pVarResult if pVarResult is not NULL.
2005-12-26 13:04:31 +01:00
Robert Shearman 6b97438011 oleaut32: Convert some tabs to spaces and some other formatting changes. 2005-12-26 13:04:02 +01:00
Robert Shearman fa49c971f1 oleaut32: Initialize member IDs to MEMBERID_NIL inITypeInfo::GetIDsOfNames.
Better tracing.
2005-12-26 13:03:27 +01:00
Robert Shearman 088fc70ede ole: Improve typelib traces.
Move the debug channel check from dump_TLBFuncDesc[One] to its callers
for more flexibility in which channel controls the output.
2005-12-26 13:02:47 +01:00
Robert Shearman 69aa9f9d2e OLE: Add const to several typelib functions.
Add const attributes to parameters for several functions and fix up
some formatting.
2005-12-12 11:52:23 +01:00
Robert Shearman a056a9a89c OLE: Implement undocumented behaviour in DispCallFunc.
Fix DispCallFunc to work with MSDN-undocumented behaviour used by
Office 2003 and document the function.
2005-12-06 21:25:51 +01:00
Robert Shearman 1f68feeef1 OLE: Implement ITypeInfo_AddressOfMember. 2005-12-06 21:24:45 +01:00
Robert Shearman b0d8e06caf OLE: Fix brokenness in typelib marshaller caused by dispinterface retval fix.
Fix more fallout from dispinterface retval patch: make typelib
marshaler use the internal function description so that it calls
dispinterface functions with the correct number of parameters again.
Also fixes some memory leaks caused by the fact that a corresponding
ReleaseXDesc function has to be called for each GetXDesc.
2005-12-06 21:24:19 +01:00
Robert Shearman 806cdce355 OLE: Update the type of the oVft parameter for DispCallFunc. 2005-12-06 21:23:09 +01:00
Robert Shearman 3dd7ba394c OLE: ITypeInfo_Invoke parameter naming change.
Rename the dwFlags parameter of ITypeInfo_Invoke since it is not a
DWORD, but an unsigned short.
2005-12-06 10:57:45 +01:00
Robert Shearman 190d05f4db OLE: Support HREFTYPEs For ITypeInfos
Add support for reading the hreftype of a typeinfo, return it to the
application in ITypeComp_Bind for the DESKIND_APPOBJECT case and
support referencing it in ITypeInfo_GetRefTypeInfo.
2005-12-03 18:20:27 +01:00
Robert Shearman d8d1693def OLE: fix function name loading
Correctly get the name of the second function of a propget/propput
pair in MSFT typelibs when the name offset is set to -1.
2005-12-03 18:20:03 +01:00
Robert Shearman bd8fefd66b OLE: fix invoking dispinterface functions
Fix invoking dispinterface functions by using the internal
representation of the function, not the one returned to applications.
2005-12-03 18:19:17 +01:00
Robert Shearman d48f6f3682 OLE: Move the dispinterface return value handling to functions that
return the FUNCDESC to the user.
2005-12-03 18:10:30 +01:00
Robert Shearman a61e4e802c OLE: fix handling of INVOKE_PROPERTYGET flag in ITypeComp_fnBind.
The INVOKE_PROPERTYGET flag shouldn't affect binding to variables; it
should just affect which of a pair of [propget] and [propput]
functions should be returned.
2005-12-03 18:03:29 +01:00
Robert Shearman cc9052c38e Make dump functions const. 2005-12-01 12:55:31 +01:00
Robert Shearman 695556af16 Remove broken return value handling code and that would reference
memory beyond the end of the arguments array. Replace it with code
that properly handles referencing the return type and setting the
return type to VT_VOID when a dispinterface function doesn't have any
return value.
2005-12-01 12:48:56 +01:00
Robert Shearman 960aadaceb Introduce a variable "elemdesc" to eliminate some long common
expressions.
Move the contents of the second arguments loop inside the first.
Move the MSFT_ReadLEDWords so that it is the last statement in the
loop since it is one of the iterators.
2005-12-01 12:34:39 +01:00
Robert Shearman 48e1a72a23 Don't truncate large integer constants. 2005-12-01 11:37:11 +01:00
Robert Shearman 55ffe637db The pparamdescex of an ELEMDESC should only be copied if wParamFlags &
PARAMFLAG_DHASDEFAULT.
Make ITypeInfo_ReleaseVarDesc use TLB_FreeElemDesc.
2005-12-01 11:12:07 +01:00
Robert Shearman 6e2804e19a Factor out code for doing ELEMDESC sizes and copies.
Copy FUNCDESC structures returned to calling applications instead of
passing a pointer to the master structure used internally.
Call VariantInit on newly allocated memory before calling VariantCopy.
2005-11-30 12:01:33 +01:00
Robert Shearman f0a600a162 Implement ITypeInfo_Bind for typelibs.
Fix some places where a returned object was AddRef'd.
Make the search through implemented types work on all types, not just
interfaces.
2005-11-29 11:25:24 +01:00
Robert Shearman 25bfb811a3 Add functions for doing a deep copy of a TYPEDESC into a flat buffer.
Copy VARDESC structures returned to calling applications instead of
passing a pointer to the master structure used internally.
2005-11-29 10:42:22 +01:00
Francois Gouget 0edbaf7e80 Remove spaces before '\n' in traces. 2005-11-10 12:14:56 +00:00
Robert Shearman 7dc54af325 - Cleanup formating of DispCallFunc.
- Fix DispCallFunc for functions with return values.
- Don't rely on _copy_arg as it is going away soon.
2005-11-09 10:31:20 +00:00
Huw Davies 753e4ee9bd Don't call Release on a null ptr. 2005-11-02 20:54:34 +00:00
Robert Shearman 1acbdd9d2a - Make wParamFlags in the paramdesc dumping function human readable.
- Enums should be VT_I4 instead of VT_INT.
- Trace the return value from the ITypeInfo_fnInvoke.
2005-11-02 19:59:13 +00:00
Robert Shearman 0033a5a8e7 - Read DLL name from modules in MSFT typelibs.
- A name offset of -1 for a parameter means that it has the same name
  as the function.
- Print an error if a ReadName is attempted with an offset of -1,
  since this will read garbage.
- Implement ITypeInfo_GetDllEntry.
2005-10-29 10:30:57 +00:00
Huw Davies 284687a621 When a dispinterface isn't dual, we should return
TYPE_E_ELEMENTNOTFOUND when trying to get index -1.
2005-10-18 14:09:47 +00:00
Mike McCormack c818a4e662 Fix "empty body in an if/else-statement" warnings. 2005-09-21 09:46:28 +00:00
Marcus Meissner 43e73ebba2 Support more arguments in _invoke(). 2005-09-19 14:29:41 +00:00
Alexandre Julliard 20a1a203c6 Use a more portable scheme for storing the name of a critical
section.
2005-09-09 10:19:44 +00:00
Robert Shearman 80c31a9cb1 - Shunt some trace statements over to the typelib channel that aren't
really much use except in debugging typelib parsing.
- Make sure to release a reference to being returned as VariantCopyInd
  takes one for us.
2005-08-29 21:46:34 +00:00
Mike McCormack a04b77ddc2 gcc 4.0 warning fixes. 2005-08-08 18:38:29 +00:00
Robert Shearman a30b6a91a1 Revert to previous behaviour of detecting names with non-alphanumeric
characters as ones with offsets, but add in a special case for an
empty name.
2005-08-08 11:04:20 +00:00
Robert Shearman 6b3b110d31 - A name in an SLTG typelib only beginning with 0xff is the indicator
of an offset, instead of any non alpha-numeric character.
- Any dispatch interface should have the fixed vtable size, not just
  dual ones.
- Warn when ITypeInfo_GetDocumentation fails.
2005-07-28 10:14:37 +00:00
Alexandre Julliard 738e88db5f Replace the ICOM_THIS_From macros by inline functions. 2005-07-27 15:14:18 +00:00
Robert Shearman 8b8c901a78 - Fix VT_BYREF|VT_UNKNOWN return values by comparing the correct value
with VT_UNKNOWN and VT_DISPATCH.
- Better tracing.
2005-07-19 20:02:38 +00:00
Robert Shearman 5550636044 Return DISP_E_EXCEPTION from ITypeInfo_Invoke on an error in the
called function.
2005-07-19 20:00:37 +00:00
Robert Shearman 0648ab6131 Remove RegisterTypeLib hack. 2005-07-19 19:43:37 +00:00
Robert Shearman 500c41b75e Support VT_BYREF|VT_I4 in _copy_arg. 2005-07-19 19:13:45 +00:00
Mike McCormack fc200d0ca7 Interlocked LONG* gcc warning fixes. 2005-07-11 10:25:19 +00:00
Stefan Huehner 17ed5537e7 Fix some more -Wmissing-declarations warnings. 2005-07-05 11:05:50 +00:00
Robert Shearman fb42af123b Add a generic TYPEDESC VT to VARIANT VT mapper so we can use the
standard Variant* routines. Use this new function to properly copy &
de-reference the return value.
2005-06-29 20:15:00 +00:00
Huw Davies fe311461a7 Cope with the index in a import table entry being a typeinfo index
rather than a guid offset.
2005-06-29 19:18:25 +00:00
Stefan Huehner 863a4b1488 Fix some more -Wstrict-prototypes warnings. 2005-06-21 20:53:13 +00:00
Marcus Meissner 970ae8d0ba Corrected string length method in ITypeLib::IsName() and FindName()
for LPOLESTR type.
2005-06-13 09:59:55 +00:00
Robert Shearman 3fe5a1eb62 Clear out parameters to stop bad pointers lying around in memory if
the function doesn't set them to anything.
2005-06-10 19:31:45 +00:00
Marcus Meissner 4dd845ed53 Fixed IType::Invoke in regards to handling propertyget variables
longer than 4 bytes (like VT_DATE).
2005-06-08 18:32:09 +00:00
Dmitry Timoshkov eba47f1dfe Make remaining OLE interface vtables const. 2005-06-06 19:50:35 +00:00
Robert Shearman 9ddf17bfa7 - Fix the return values from QueryPathOfRegTypeLib.
- Open registry key with least access rights necessary.
- Documentation updates.
2005-06-01 11:03:29 +00:00
Daniel Remenak d46cc36347 Remove unused variable in _copy_arg. 2005-04-14 11:32:10 +00:00
Jakob Eriksson 9ed61de9a2 Get rid of HeapAlloc casts. 2005-03-24 21:01:35 +00:00
Francois Gouget 93416cdaf7 Assorted spelling fixes. 2005-03-23 13:15:18 +00:00
Francois Gouget fbb3343547 Assorted spelling fixes. 2005-03-02 13:53:50 +00:00
Jon Griffiths eb5bf7dd38 Documentation spelling fixes. 2005-02-25 14:07:56 +00:00
Huw Davies beea69c820 The typelib cache should take the typelib resource index into
account.
2005-02-22 19:30:16 +00:00
Jon Griffiths 743fb99a9f Use variant macros instead of accessing the union directly. 2005-02-22 14:54:01 +00:00
Mike Hearn 80380eaa32 Allow loading of builtin typelibs. 2005-02-21 18:34:41 +00:00
Vincent Béron dff207d3ce Remove message telling users to copy native stdole32.tlb over as we
now provide it.
Better trace in LoadTypeLib.
Change debug messages type to reflect we provide stdole32.tlb.
2005-01-31 11:34:10 +00:00
Huw Davies d070d8fb46 The value of a packed VARIANT can be up to 1L << 26 - 1. 2005-01-09 18:00:32 +00:00
Paul Vriens 202b340a51 - use Interlocked* functions in AddRef and Release.
- store the result of the Interlocked functions and use only this.
2005-01-09 17:29:21 +00:00
Huw Davies dcb25230e0 Fix comment to reflect reality and indeed the code. 2004-12-17 18:56:49 +00:00
Jon Griffiths f82272c92f Remove unneeded headers to reduce unneeded rebuilds. 2004-12-16 14:35:55 +00:00
Eric Pouech 4056d7ef8c Fixed some errors in function prototypes. 2004-12-13 21:19:01 +00:00
Huw Davies 033276b687 Remove the remaining dependencies on internal structures from Invoke. 2004-12-09 11:36:27 +00:00
Huw Davies 3dc64fc541 GetTypeAttr should deep copy the typedesc. 2004-12-08 19:32:28 +00:00
Huw Davies 7a6c099921 Fix return value of GetVarIndexOfMemId. 2004-12-08 17:48:16 +00:00
Huw Davies 23ded07e63 Remove Invoke's dependence on the internal TLBFuncDesc structure.
Fix memory leaks in some failure cases.
2004-12-07 16:59:40 +00:00
Huw Davies 367d16931e GetFuncIndexOfMemId should respect invkind and return
TYPE_E_ELEMENTNOTFOUND if the function cannot be found.
2004-12-07 14:18:29 +00:00
Huw Davies 81768fe150 Allocate the TYPEATTR rather than copying it.
For a dual interface the dispinterface's cfuncs should include the
inherited functions, cbSizeVft should just be the size of IDispatch's
vtbl and we should strip TYPEFLAG_FOLEAUTOMATION.
2004-12-02 19:58:07 +00:00
Alexandre Julliard 32457b4f5a Converted more of the (Un)RegisterTypeLib code to Unicode.
Factored out some common routines.
2004-10-22 22:09:09 +00:00
Mike McCormack 56fc9bfade Use Unicode functions in RegisterTypeLib. 2004-10-22 20:29:34 +00:00
Vincent Béron 4eeae1adb3 Fix some types problems. 2004-10-18 22:39:21 +00:00
Francois Gouget 486d020c1b Don't define COBJMACROS in objbase.h.
Update the Wine sources accordingly.
2004-10-07 03:06:48 +00:00
Huw Davies ddae24c50b Implement CreateDispTypeInfo. 2004-10-05 18:07:49 +00:00
Marcus Meissner 5539e288a6 Function return types cannot be const. 2004-09-27 20:33:27 +00:00
Alexandre Julliard 241a4c34b1 Get rid of the non-standard ICOM_THIS macro. 2004-09-09 21:03:58 +00:00
Jacek Caban ab4b5fbd70 Added suport for optional arguments in ITypeInfo::Invoke. 2004-08-27 19:10:47 +00:00
Alexandre Julliard f714b39762 Get rid of the no longer used ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
macro.
2004-08-23 19:39:48 +00:00
Jacek Caban bf9f8da333 Ref counting fixes. 2004-08-19 20:29:16 +00:00
Alexandre Julliard 48c4bb3c31 Get rid of the non-standard ICOM_VTABLE macro. 2004-08-12 23:00:51 +00:00
Alexandre Julliard 0467ce9fd7 Get rid of the non-standard ICOM_VFIELD macro. 2004-08-12 19:52:49 +00:00
Mike McCormack 0394eeed8d Refcounting fixes. 2004-07-06 21:28:13 +00:00
Mike Hearn 163eb22bff Dump function return type in typelib traces, add trace support for
VT_HRESULT.
2004-06-28 20:31:39 +00:00
Ivan Leo Puoti c01570cc33 Removed dcom link. 2004-05-29 00:22:38 +00:00
Francois Gouget 52c0832161 Make Unicode strings static const. 2004-04-20 01:12:17 +00:00
Francois Gouget 6a6c85c6d8 Make Unicode const strings static so they are not copied to the stack
each time we enter the function.
2004-04-19 20:12:14 +00:00
Robert Shearman 92940e0c4f BSTR of length 0 is allowed. 2004-03-22 22:57:51 +00:00
Marcus Meissner 09c8cc97f7 Added more argument numbers for _invoke(). 2003-12-30 19:06:21 +00:00
Marcus Meissner 30ccb3bd22 Yet another useful hint for missing stdole32.tlb. 2003-12-15 19:47:51 +00:00
Andrew de Quincey eb4d6e079d - Implemented HELPDIR subkeys properly in RegisterTypeLib().
- Implemented UnRegisterTypeLib().
- Fixed various minor bugs.
2003-12-13 00:04:06 +00:00
Andrew de Quincey 8b773b125a Upwards traversal of inheritance tree didn't occur for dispatch
interfaces.
2003-12-10 00:38:17 +00:00
Jon Griffiths 4f0f1d9253 Improve/shrink variant dumping code. 2003-11-25 01:49:48 +00:00
Dmitry Timoshkov 1fa82e51c2 Apply same magic to LibAttr.lcid from MSFT to SLTG. 2003-11-18 00:02:25 +00:00
Jon Griffiths bb61fe35a2 Dump a few more known variant types.
Don't call DateToTM() - it's going away soon.
2003-11-14 20:59:46 +00:00
Marcus Meissner 49eaa0db2b Do not coerce arguments of ITypeLib::Invoke in-place, or we get
corrupted variants.
Handle V_ARRAY | something -> VT_SAFEARRAY, as this is a NOP.
2003-11-03 22:13:05 +00:00
Alexandre Julliard 81db03dd61 The imported typelib name must be converted to Unicode. 2003-10-16 19:09:41 +00:00
Daniel Marmier 0348649853 Fixed warnings with gcc option "-Wwrite-strings". 2003-10-06 21:03:32 +00:00
Alexandre Julliard e37c6e18d0 Fixed header dependencies to be fully compatible with the Windows
headers (with help from Dimitrie O. Paun).
2003-09-05 23:08:26 +00:00