private void TransitionFromPassiveToLoaded()
{
Debug.Assert(this.ActiveXState == ActiveXHelper.ActiveXState.Passive, "Wrong start state to transition from");
if (this.ActiveXState == ActiveXHelper.ActiveXState.Passive)
{
//
// First, create the ActiveX control
Debug.Assert(_axInstance == null, "_axInstance must be null");
_axInstance = CreateActiveXObject(_clsid.Value);
Debug.Assert(_axInstance != null, "w/o an exception being thrown we must have an object...");
//
// We are now Loaded!
this.ActiveXState = ActiveXHelper.ActiveXState.Loaded;
//
// Lets give them a chance to cast the ActiveX object
// to the appropriate interfaces.
this.AttachInterfacesInternal();
}
}