Notes client crash when using ActiveX

Hi

I’m trying to use an activex on a form. The activex is added as an object to the form and the form is embedded in a framset.

The activex is made in Delphi and consists of a toolbar with buttons and a popupmenu per button. The activex act’s as a custumizeable menu for the frameset, in which it’s used.

The active works fine and fires events to Notes as expected.

Problem is: Each time I close down my Notes client, after having activated my frameset with this activex, Notes crashes while closing.

When testing my activex with a window application og Internet Explorer as ‘host-application’ there are no such problems. It seems as Notes somehow tries to reference the activex after it has freed it’s memory and therefor make references to wrong memory. Sometimes the Notes crash also involves crash of other apps. that has nothing to do with Notes nor the activex.

I have tried to dereference the object in Notes by following code in the forms Terminate event:

Dim ws As New NotesUIWorkspace 	

Dim menu As Variant 

Set menu = ws.CurrentDocument.GetObject("XLIFCMenu Control")

Call menu.Close

Call DestroyWindow(menu.handle)

Set menu = Nothing



Call CoFreeUnusedLibraries

The code is executed without any errors and I can se the object ‘leave the form’, but still Notes crashes.

Another info: The Notes client keeps a lock to the physical activex ocx-file although freeing it, as mentioned.

Has anyone experienced something like this and know what to do about it?

Thanks in advance!

Benny