/// <summary>
 /// Get mapped NLS section
 /// </summary>
 /// <param name="type">The type of section</param>
 /// <param name="codepage">The codepage number</param>
 /// <returns>The mapped section if it exists.</returns>
 public static NtMappedSection GetNlsSectionPtr(NlsSectionType type, int codepage)
 {
     IntPtr ptr;
     IntPtr size;
     NtSystemCalls.NtGetNlsSectionPtr(type, codepage, IntPtr.Zero, out ptr, out size).ToNtException();
     return new NtMappedSection(ptr, size.ToInt64(), NtProcess.Current, false);
 }
Esempio n. 2
0
        /// <summary>
        /// Get mapped NLS section
        /// </summary>
        /// <param name="type">The type of section</param>
        /// <param name="codepage">The codepage number</param>
        /// <returns>The mapped section if it exists.</returns>
        public static NtMappedSection GetNlsSectionPtr(NlsSectionType type, int codepage)
        {
            IntPtr ptr;
            IntPtr size;

            NtSystemCalls.NtGetNlsSectionPtr(type, codepage, IntPtr.Zero, out ptr, out size).ToNtException();
            return(new NtMappedSection(ptr, size.ToInt64(), NtProcess.Current, false));
        }
Esempio n. 3
0
 /// <summary>
 /// Get mapped NLS section
 /// </summary>
 /// <param name="type">The type of section</param>
 /// <param name="codepage">The codepage number</param>
 /// <returns>The mapped section if it exists.</returns>
 public static NtMappedSection GetNlsSectionPtr(NlsSectionType type, int codepage)
 {
     return(GetNlsSectionPtr(type, codepage, true).Result);
 }
Esempio n. 4
0
 /// <summary>
 /// Get mapped NLS section
 /// </summary>
 /// <param name="type">The type of section</param>
 /// <param name="codepage">The codepage number</param>
 /// <param name="throw_on_error">True to throw on error.</param>
 /// <returns>The mapped section if it exists.</returns>
 public static NtResult <NtMappedSection> GetNlsSectionPtr(NlsSectionType type, int codepage, bool throw_on_error)
 {
     return(NtSystemCalls.NtGetNlsSectionPtr(type, codepage, IntPtr.Zero, out IntPtr ptr, out IntPtr size)
            .CreateResult(throw_on_error, () => new NtMappedSection(ptr, size.ToInt64(), NtProcess.Current, false)));
 }
Esempio n. 5
0
 public static extern NtStatus NtGetNlsSectionPtr(NlsSectionType NlsType, int CodePage, IntPtr ContextData, out IntPtr SectionPointer, out IntPtr SectionSize);
 public static extern NtStatus NtGetNlsSectionPtr(NlsSectionType NlsType, int CodePage, IntPtr ContextData, out IntPtr SectionPointer, out IntPtr SectionSize);