Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
COM properties in .NET
Message
De
17/10/2008 12:34:59
 
 
À
17/10/2008 11:41:21
Information générale
Forum:
ASP.NET
Catégorie:
Controls activeX
Versions des environnements
Environment:
C# 3.0
OS:
Windows XP SP1
Network:
Windows 2008 Server
Database:
MS SQL Server
Divers
Thread ID:
01355559
Message ID:
01355614
Vues:
36
>>>Hi,
>>>
>>>I'm consuming a third party COM dll in .NET. When viewed in the .NET object browser all of it's public R/W properties show up as accessible only via get and set methods (other properties that are R/O *do* appear as properties) I queried this with them and was told this was standard behaviour.
>>>
>>>I have some VB6 DLL of my own here so decided to test their assumption. When I add a reference to my own DLL's all of their numerous public properties are exposed normally. Or I should say all except one. Several of the VB controls have a property of the same name and type - and this property is exposed via get_PropertyName() and set_PropertyName() in all of them.
>>>
>>>Now obviously the third party developers are incorrect in claiming their DLL is exposed in a normal fashion. But as my DLL indicates there is *something* that causes this behaviour. Anyone know what it is?
>>>
>>>Best,
>>>Viv
>>
>>You didn't mention what the 3rd party com interop dll is written in.
>>
>>While his articles were focused on com interop between vfp and .net, he covers a lot of the configuration requirements to expose via com interop:
>>
>>http://www.west-wind.com/WebLog/posts/3972.aspx
>>
>>I've followed it from both vfp and .net successfully. He has an article somewhere on his website for has to be done in a .net dll to expose via com interop as well...
>
>Hi,
>
>Not sure but I think the DLL is almost certainly from VB6 code.
>I've read Rick's paper but I can't see anything relevant to this problem. At the moment I'm just concentrating on what's happening when I access my own DLL - I've got the VB source for that and can experiment with it.
>
>HA! Just spotted the difference:
>If the properties Let() in VB6 doesn't specifically mark the incoming value as 'ByVal' then you need get/sets to access it. That sort of makes sense - but I thought the default in old VB was ByVal anyway. And it doesn't explain why on earth the third party guys would have used ByRef all the time - guess I'll just put a wrapper around it to simplify access.....
>
>Best,
>Viv

Interesting, it looks like a known issue. That is mentioned in these two links:

http://support.microsoft.com/?kbid=316581
http://social.msdn.microsoft.com/Forums/en-US/vblanguage/thread/b8e26285-1f2a-4a1a-9ca4-9d198d0bd9dd/

You might want to let the supplier of your 3rd party dll know about it...
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform