Menu menubar = getShell().getMenuBar();
private int SetMenu(int hmenuShared, int holemenu, int hwndActiveObject) {	int inPlaceActiveObject = 0;	if (objIOleInPlaceActiveObject != null)		inPlaceActiveObject = objIOleInPlaceActiveObject.getAddress();				if (menubar == null || menubar.isDisposed()){		return COM.OleSetMenuDescriptor(0, getShell().handle, hwndActiveObject, iOleInPlaceFrame.getAddress(), inPlaceActiveObject);	}		int handle = menubar.getShell().handle;		if (hmenuShared == 0 && holemenu == 0) {		// re-instate the original menu - this occurs on deactivation		hmenuShared = menubar.handle;	}	if (hmenuShared == 0) return COM.E_FAIL;		OS.SetMenu(handle, hmenuShared);	OS.DrawMenuBar(handle);		return COM.OleSetMenuDescriptor(holemenu, handle, hwndActiveObject, iOleInPlaceFrame.getAddress(), inPlaceActiveObject);}