Wombat.MamaMsg.tryStringAnsi C# (CSharp) Method

tryStringAnsi() public method

public tryStringAnsi ( string name, ushort fid, IntPtr &result ) : bool
name string
fid ushort
result System.IntPtr
return bool
        public bool tryStringAnsi(string name, ushort fid, ref IntPtr result)
        {
            result = IntPtr.Zero;
            if (MamaWrapper.CheckResultCodeIgnoreNotFound(
                NativeMethods.mamaMsg_getString(base.nativeHandle, name, fid, ref result))
                != MamaStatus.mamaStatus.MAMA_STATUS_OK)
            {
                return false;
            }
            return true;
        }

Same methods

MamaMsg::tryStringAnsi ( Wombat.MamaFieldDescriptor descriptor, IntPtr &result ) : bool

Usage Example

Example #1
0
        private bool getEntriesInfo(MamaMsg entMsg)
        {
            int priceLevelEntryActionInt = 0;
            ulong mPriceLevelEntrySizeUlong = 0;

            if (entMsg.tryI32(MamdaOrderBookFields.ENTRY_ACTION, ref priceLevelEntryActionInt))
            {
                mPriceLevelEntryAction = (sbyte) priceLevelEntryActionInt;
            }

            entMsg.tryU64 (MamdaOrderBookFields.ENTRY_SIZE, ref mPriceLevelEntrySizeUlong);
            mPriceLevelEntrySize = (long) mPriceLevelEntrySizeUlong;

            mPriceLevelEntryTime = entMsg.getDateTime(MamdaOrderBookFields.ENTRY_TIME, mPriceLevelTime);

            if(entMsg.tryStringAnsi (MamdaOrderBookFields.ENTRY_ID, ref mPriceLevelEntryIdIntPtr))
            {
                return true;
            }
            else
            {
                return false;
            }
        }
MamaMsg