On 29/01/2020 11:20, Jacek Caban wrote:
On 28/01/2020 16:41, Gabriel Ivăncescu wrote:
On 28/01/2020 17:34, Jacek Caban wrote:
Hi Gabriel,
On 27.01.2020 16:32, Gabriel Ivăncescu wrote:
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com
dlls/vbscript/vbdisp.c | 153 ++++++++++++++++++++++++++++++++++++++++-
Could we use CreateTypeLib/CreateTypeLib2 for that?
Thanks,
Jacek
Hi Jacek,
I'm not sure, is there a way to attach an existing TypeInfo to it?
CreateTypeInfo could be used for TypeInfo.
We'll definitely need it for the FindName/IsName methods.
What's special about FindName/IsName?
It can, but we already have the TypeInfo. CreateTypeInfo would need to create one from scratch, which seems silly to do just for the typelib. Also, not sure if it matters, but it would copy everything instead of ref-counting like currently, so it's a bit less efficient, too.
FindName/IsName aren't special, but they need access to the function and variable names. Using CreateTypeInfo means rewriting the whole thing or duplicating code just for the typelib, including each function and variable.
Also, it seems it requires a filename, to create on disk, so I don't think it will work as we don't do that.
As far as I can see it just stores the file name so that you may (or may not) save it later.
That said, most of it is quite straightforward currently compared to the TypeInfo, except for FindName.
I tested it and it looks like ICreateTypeLib2 is exposed by native:
https://testbot.winehq.org/JobDetails.pl?Key=64042
And I'm sorry for not asking about it earlier. I assumed that we just need a customized subset of ITypeInfo, not full implementation of all related interfaces.
Thanks,
Jacek
Right, I didn't consider that interface important for now. Either way, if you don't like the current approach for the typelib, I guess I'll postpone it since it's not that important. I wrote it because it was somewhat trivial after the TypeLib patches, instead of having to rewrite all of it. :-)
Thanks, Gabriel