//
archives

.NET Events

This category contains 2 posts

Passing a Reference to a SAFEARRAY as Parameter to a Managed COM Event Handler Part 1.

1. Introduction 1.1 I recently ran into an unexpected problem with the .NET CLR. 1.2 It appears that its internal internal mechanism for processing COM events inadequately handles reference SAFEARRAYs passed as event parameters. 1.3 In this blog, I will demonstrate the problem with sample codes. It is my hope that interested readers will research … Continue reading

Handling .NET Events in Unmanaged Code using Event Accessors.

1. Introduction. 1.1 In the .NET framework, events are activated and handled using the event-delegate model. 1.2 Such a system is alien to unmanaged code. 1.3 However, there are ways to bridge .NET events to the unmanaged world. COM interop (via the use of the ComSourceInterfacesAttribute) being the conventional way. 1.4 The specific technique used is the COM connection … Continue reading