00001 using System; 00002 using System.Collections.Generic; 00003 using System.Text; 00004 00005 namespace EmbeddedCh 00006 { 00007 //typedef void *ChUserDefinedTag_t; /* pointer to tag of struct/class/union */ 00008 public class ChUserDefinedTag 00009 { 00010 private IntPtr ptr; 00011 00012 public ChUserDefinedTag() 00013 { 00014 ptr = IntPtr.Zero; 00015 } 00016 00017 public IntPtr Tag 00018 { 00019 get 00020 { 00021 return ptr; 00022 } 00023 set 00024 { 00025 if (value != IntPtr.Zero) 00026 { 00027 //might want to check and free ptr here too. 00028 ptr = value; 00029 } 00030 } 00031 } 00032 } 00033 }