Groups | Blog | Home
all groups > dotnet general > may 2007 >

dotnet general : COM attribute named Event


aaron.m.johnson NO[at]SPAM gmail.com
5/30/2007 9:21:25 AM
I'm using a COM object in .NET that has an array attribute named
Event. Since event is apparently a reserved word in .NET, it's making
me call get_Event() to retrieve the data. The problem is that the
object I'm getting back from get_Event seems to be broken. If I try
to access any of it's attributes I get either an access violation or
what I think is a spurious LoaderLock exception.

All the other COM objects, methods and attributes from this DLL work
just fine in .NET, and it all works perfectly in C++ applications.
This makes me wonder if something different is happening because I'm
calling get_Event(). Maybe the reference counting isn't being done or
something?

I'm kind of grasping at straws right now.
aaron.m.johnson NO[at]SPAM gmail.com
5/30/2007 9:54:33 AM
OK, after a bit more research, the problem with the Event property is
that it's an array, and .NET doesn't support parameterized properties.

That tells me why I have to use get_Event, but not why my objects are
corrupt.
AddThis Social Bookmark Button