Esempio n. 1
0
 internal State(MemoryStream ms, int storageType, AxHost ctl, PropertyBagStream propBag)
 {
     type = storageType;
     PropertyBagBinary = propBag;
     // dangerous?
     length       = (int)ms.Length;
     this.ms      = ms;
     manualUpdate = ctl.GetAxState(AxHost.manualUpdate);
     licenseKey   = ctl.GetLicenseKey();
 }
Esempio n. 2
0
 internal State(MemoryStream memoryStream, int storageType, AxHost control, PropertyBagStream propertyBag)
 {
     Type         = storageType;
     _propertyBag = propertyBag;
     // dangerous?
     _length       = (int)memoryStream.Length;
     _memoryStream = memoryStream;
     _manualUpdate = control.GetAxState(s_manualUpdate);
     _licenseKey   = control.GetLicenseKey();
 }
Esempio n. 3
0
            unsafe HRESULT IOleControlSite.TranslateAccelerator(User32.MSG* pMsg, KEYMODIFIERS grfModifiers)
            {
                if (pMsg is null)
                {
                    return HRESULT.E_POINTER;
                }

                Debug.Assert(!_host.GetAxState(s_siteProcessedInputKey), "Re-entering IOleControlSite.TranslateAccelerator!!!");
                _host.SetAxState(s_siteProcessedInputKey, true);

                Message msg = *pMsg;
                try
                {
                    bool f = _host.PreProcessMessage(ref msg);
                    return f ? HRESULT.S_OK : HRESULT.S_FALSE;
                }
                finally
                {
                    _host.SetAxState(s_siteProcessedInputKey, false);
                }
            }
Esempio n. 4
0
            unsafe HRESULT Ole32.IOleControlSite.TranslateAccelerator(User32.MSG *pMsg, Ole32.KEYMODIFIERS grfModifiers)
            {
                if (pMsg == null)
                {
                    return(HRESULT.E_POINTER);
                }

                Debug.Assert(!host.GetAxState(AxHost.siteProcessedInputKey), "Re-entering Ole32.IOleControlSite.TranslateAccelerator!!!");
                host.SetAxState(AxHost.siteProcessedInputKey, true);

                Message msg = *pMsg;

                try
                {
                    bool f = ((Control)host).PreProcessMessage(ref msg);
                    return(f ? HRESULT.S_OK : HRESULT.S_FALSE);
                }
                finally
                {
                    host.SetAxState(AxHost.siteProcessedInputKey, false);
                }
            }
 internal State(MemoryStream ms, int storageType, AxHost ctl, AxHost.PropertyBagStream propBag)
 {
     this.VERSION = 1;
     this.type = storageType;
     this.propBag = propBag;
     this.length = (int) ms.Length;
     this.ms = ms;
     this.manualUpdate = ctl.GetAxState(AxHost.manualUpdate);
     this.licenseKey = ctl.GetLicenseKey();
 }
 internal State(AxHost ctl)
 {
     this.VERSION = 1;
     this.CreateStorage();
     this.manualUpdate = ctl.GetAxState(AxHost.manualUpdate);
     this.licenseKey = ctl.GetLicenseKey();
     this.type = 2;
 }
Esempio n. 7
0
 // create on init new w/ storage...
 /// <devdoc>
 ///    <para>[To be supplied.]</para>
 /// </devdoc>
 internal State(AxHost ctl) {
     CreateStorage();
     manualUpdate = ctl.GetAxState(AxHost.manualUpdate);
     licenseKey = ctl.GetLicenseKey();
     type = STG_STORAGE;
 }