static Win32_FIXED_INFO GetInstance ()
		{
			int len = 0;
			byte [] bytes = null;
			GetNetworkParams (null, ref len);
			bytes = new byte [len];
			GetNetworkParams (bytes, ref len);
			Win32_FIXED_INFO info = new Win32_FIXED_INFO ();
			unsafe {
				fixed (byte* ptr = bytes) {
					Marshal.PtrToStructure ((IntPtr) ptr, info);
				}
			}
			return info;
		}
Exemple #2
0
        private unsafe static Win32_FIXED_INFO GetInstance()
        {
            int num = 0;

            Win32_FIXED_INFO.GetNetworkParams(null, ref num);
            byte[] array = new byte[num];
            Win32_FIXED_INFO.GetNetworkParams(array, ref num);
            Win32_FIXED_INFO win32_FIXED_INFO = new Win32_FIXED_INFO();

            fixed(byte *value = ref (array != null && array.Length != 0)?ref array[0] : ref *null)
            {
                Marshal.PtrToStructure((IntPtr)((void *)value), win32_FIXED_INFO);
            }

            return(win32_FIXED_INFO);
        }
        private unsafe static Win32_FIXED_INFO GetInstance()
        {
            //IL_003a: Incompatible stack types: I vs Ref
            int size = 0;

            byte[] array = null;
            GetNetworkParams(null, ref size);
            array = new byte[size];
            GetNetworkParams(array, ref size);
            Win32_FIXED_INFO win32_FIXED_INFO = new Win32_FIXED_INFO();

            fixed(byte *value = &((array != null && array.Length != 0) ? ref array[0] : ref *(byte *)null))
            {
                Marshal.PtrToStructure((IntPtr)(void *)value, win32_FIXED_INFO);
            }

            return(win32_FIXED_INFO);
        }
		static Win32_FIXED_INFO GetInstance ()
		{
#if !MOBILE
			int len = 0;
			byte [] bytes = null;
			GetNetworkParams (null, ref len);
			bytes = new byte [len];
			GetNetworkParams (bytes, ref len);
			Win32_FIXED_INFO info = new Win32_FIXED_INFO ();
			unsafe {
				fixed (byte* ptr = bytes) {
					Marshal.PtrToStructure ((IntPtr) ptr, info);
				}
			}
			return info;
#else
		throw new NotImplementedException ();
#endif
		}
Exemple #5
0
        static Win32_FIXED_INFO GetInstance()
        {
            int len = 0;

            byte [] bytes = null;
            GetNetworkParams(null, ref len);
            bytes = new byte [len];
            GetNetworkParams(bytes, ref len);
            Win32_FIXED_INFO info = new Win32_FIXED_INFO();

            unsafe
            {
                fixed(byte *ptr = bytes)
                {
                    Marshal.PtrToStructure((IntPtr)ptr, info);
                }
            }
            return(info);
        }
        static Win32_FIXED_INFO GetInstance()
        {
#if !MOBILE
            int     len   = 0;
            byte [] bytes = null;
            GetNetworkParams(null, ref len);
            bytes = new byte [len];
            GetNetworkParams(bytes, ref len);
            Win32_FIXED_INFO info = new Win32_FIXED_INFO();
            unsafe
            {
                fixed(byte *ptr = bytes)
                {
                    Marshal.PtrToStructure((IntPtr)ptr, info);
                }
            }
            return(info);
#else
            throw new NotImplementedException();
#endif
        }