コード例 #1
0
ファイル: Dde.cs プロジェクト: mo5h/omeo
        /// <summary>
        /// Initializes the use of DDE.
        /// </summary>
        public Dde()
        {
            if (_instance != 0)
            {
                throw new InvalidOperationException("Must be uninitialized.");
            }

            CheckOwnerThread();

            // Initialize as a client
            _ddecallback = new PFNCALLBACK(DdeCallback);
            DdeError dwError = DdeInitialize(ref _instance, _ddecallback, (uint)AfCmd.APPCMD_CLIENTONLY, 0u);             // TODO: callback collected

            if (dwError != DdeError.DMLERR_NO_ERROR)
            {
                throw new DdeException("Failed to initialize DDE.", dwError);
            }
        }
コード例 #2
0
ファイル: Dde.cs プロジェクト: mo5h/omeo
 internal static extern DdeError DdeInitialize(ref DWORD pidInst, PFNCALLBACK pfnCallback, DWORD afCmd, DWORD ulRes);