コード例 #1
0
 public Library LoadLibrary(string name)
 {
     if (Path.HasExtension(name))
     {
         name = Path.GetFileNameWithoutExtension(name);
     }
     name = name.ToLower();
     if (!_cache.ContainsKey(name))
     {
         switch (name)
         {
             case "kernel32":
                 var library = new Kernel32();
                 library.Intialize();
                 _cache.Add(name, library);
                 break;
             default:
                 _cache.Add(name, null);
                 break;
         }
     }
     return _cache[name];
 }
コード例 #2
0
 public static extern SafeMemoryMappedViewHandle MapViewOfFile(
     SafeMemoryMappedFileHandle hFileMappingObject,
     Kernel32.FileMapAccess dwDesiredAccess,
     uint dwFileOffsetHigh,
     uint dwFileOffsetLow,
     IntPtr dwNumberOfBytesToMap);