GetItemValues() static private method

Unmarshals and deallocates a OPCITEMSTATE structures.
static private GetItemValues ( IntPtr &pInput, int count, bool deallocate ) : DaValue[]
pInput System.IntPtr
count int
deallocate bool
return DaValue[]
Ejemplo n.º 1
0
        /// <summary>
        /// Called when an asynchronous read operation completes.
        /// </summary>
        public void OnReadComplete(
            int dwTransid,
            int hGroup,
            int hrMasterquality,
            int hrMastererror,
            int dwCount,
            int[]                phClientItems,
            object[]             pvValues,
            short[]              pwQualities,
            System.Runtime.InteropServices.ComTypes.FILETIME[] pftTimeStamps,
            int[]                pErrors)
        {
            try
            {
                // unmarshal item values.
                DaValue[] values = ComDaGroup.GetItemValues(
                    dwCount,
                    pvValues,
                    pwQualities,
                    pftTimeStamps,
                    pErrors);

                // invoke the callback.
                m_group.OnReadComplete(dwTransid, phClientItems, values);
            }
            catch (Exception e)
            {
                Utils.Trace(e, "Unexpected error processing OnReadComplete callback.");
            }
        }