Exemple #1
0
        private void TestScript()
        {
            short w1, w2, w3;

            m_head.GetScriptCount(out w1);

            m_head.AddScript("foo", "barism", 0);

            m_head.GetScriptCount(out w2);
            Debug.Assert(w2 == w1 + 1);

            long  l;
            short pLen = 0, pCLen = 0;

            m_head.GetScript(w1, null, ref pLen, null, ref pCLen, out l);

            StringBuilder sbType = new StringBuilder(pLen);
            StringBuilder sbCom  = new StringBuilder(pCLen);

            m_head.GetScript(w1, sbType, ref pLen, sbCom, ref pCLen, out l);

            m_head.RemoveScript(w1);

            m_head.GetScriptCount(out w3);
            Debug.Assert(w3 == w1);
        }
Exemple #2
0
 /// <summary>
 /// Remove a script. Wraps IWMHeaderInfo.RemoveScript
 /// </summary>
 /// <param name="index">Index of script to remove</param>
 public void RemoveScript(int index)
 {
     m_HeaderInfo.RemoveScript((ushort)index);
 }