ACAT.Lib.Core.Utility.FileUtils.GetMappedFileName C# (CSharp) Метод

GetMappedFileName() публичный статический Метод

Returns the mapped file name of a memory mapped file
public static GetMappedFileName ( IntPtr hModule ) : String
hModule System.IntPtr handle to the module
Результат String
        public static String GetMappedFileName(IntPtr hModule)
        {
            var mappedFileName = String.Empty;
            const int bufLen = 260;

            var buffer = new StringBuilder(bufLen);

            int len = Kernel32Interop.GetMappedFileName(Kernel32Interop.GetCurrentProcess(),
                                                        hModule,
                                                        buffer,
                                                        buffer.Capacity);
            if (len != 0)
            {
                mappedFileName = buffer.ToString();
            }

            return mappedFileName;
        }