示例#1
0
            public COPYDATASTRUCT_REF(uint op, GoToRefMessage msg)
            {
                IntPtr structPtr = Marshal.AllocCoTaskMem(Marshal.SizeOf(msg));

                Marshal.StructureToPtr(msg, structPtr, false);

                dwData = op;
                lpData = structPtr;
                cbData = Marshal.SizeOf(msg);
            }
示例#2
0
        static public int SynchronizeRef(byte book, byte chapter, byte verse)
        {
            int            hWnd = FindWindow(TheWordClassName, null);
            GoToRefMessage msg  = new GoToRefMessage()
            {
                span = 0, bi = book, ci = chapter, vi = verse
            };
            COPYDATASTRUCT_REF cds = new COPYDATASTRUCT_REF(COPYDATA_OP_GOTOVERSE, msg);

            return(SendMessage(hWnd, WM_COPYDATA, 0, ref cds));
        }