We have problems with COM objects together with the new version.
The code attached gives an exception when calling oOutlook:finit:
System.Runtime.InteropServices.COMException HResult=0x80020006 Message=Unbekannter Name. (Ausnahme von HRESULT: 0x80020006 (DISP_E_UNKNOWNNAME
Robert has already found out, that strong typing helps. Unfortunately we have quite a lot of code untyped, also objects created by COM objects, that are not used as local variables. Also we have some special solutions with COM objects stored in macros.
I assume that the reason is, that access variables are called in another way then "Getters" in C# are called and therefore the compiler has to know the code.
Are there any other possibilities resolving this without strong typing, maybe by substituting some of the code attached?
Exceptions in COM objects with X# 2.6
- ArneOrtlinghaus
- Posts: 412
- Joined: Tue Nov 10, 2015 7:48 am
- Location: Italy
Exceptions in COM objects with X# 2.6
- Attachments
-
- testoutlook.txt
- (709 Bytes) Downloaded 65 times
Exceptions in COM objects with X# 2.6
Arne,
I am looking into this.
The problem only seems to happen when you access the properties of the OleAutoObject itself (fInit, dwFuncs, dwVars). Properties of the com object should work fine.
I'll try to release an updated assembly today.
Robert
I am looking into this.
The problem only seems to happen when you access the properties of the OleAutoObject itself (fInit, dwFuncs, dwVars). Properties of the com object should work fine.
I'll try to release an updated assembly today.
Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
The Netherlands
robert@xsharp.eu
- ArneOrtlinghaus
- Posts: 412
- Joined: Tue Nov 10, 2015 7:48 am
- Location: Italy
Exceptions in COM objects with X# 2.6
Thank you very much.
It is not so urgent, only I wanted to have an answer into which direction I should go.
I tried ivarget(oOutlook, #fInit), but it generates the same error, so it isn't easy to make a workaround without strong typing.
It is not so urgent, only I wanted to have an answer into which direction I should go.
I tried ivarget(oOutlook, #fInit), but it generates the same error, so it isn't easy to make a workaround without strong typing.