NativeToManaged() статический приватный Метод

static private NativeToManaged ( IntPtr nativeData ) : string
nativeData System.IntPtr
Результат string
Пример #1
0
 public static string Description(IntPtr exception)
 {
     if (NativeLibrary.Is64Bit)
     {
         return(UTF8Marshaler.NativeToManaged(NativeMethods.X64.MagickExceptionHelper_Description(exception)));
     }
     else
     {
         return(UTF8Marshaler.NativeToManaged(NativeMethods.X86.MagickExceptionHelper_Description(exception)));
     }
 }
Пример #2
0
        private static void OnLog(UIntPtr type, IntPtr text)
        {
            if (_log == null)
            {
                return;
            }

            string managedText = UTF8Marshaler.NativeToManaged(text);

            _log(null, new LogEventArgs((LogEvents)type, managedText));
        }
Пример #3
0
 public string RemoveOption(string key)
 {
     using (INativeInstance keyNative = UTF8Marshaler.CreateInstance(key))
     {
         if (NativeLibrary.Is64Bit)
         {
             return(UTF8Marshaler.NativeToManaged(NativeMethods.X64.MagickSettings_RemoveOption(Instance, keyNative.Instance)));
         }
         else
         {
             return(UTF8Marshaler.NativeToManaged(NativeMethods.X86.MagickSettings_RemoveOption(Instance, keyNative.Instance)));
         }
     }
 }
Пример #4
0
 public static string GetFontFamily(IntPtr instance, int index)
 {
     #if PLATFORM_AnyCPU
     if (NativeLibrary.Is64Bit)
     #endif
     #if PLATFORM_x64 || PLATFORM_AnyCPU
     return(UTF8Marshaler.NativeToManaged(NativeMethods.X64.Magick_GetFontFamily(instance, (UIntPtr)index)));
     #endif
     #if PLATFORM_AnyCPU
     else
     #endif
     #if PLATFORM_x86 || PLATFORM_AnyCPU
     return(UTF8Marshaler.NativeToManaged(NativeMethods.X86.Magick_GetFontFamily(instance, (UIntPtr)index)));
     #endif
 }
Пример #5
0
 public static string Message(IntPtr exception)
 {
     #if PLATFORM_AnyCPU
     if (NativeLibrary.Is64Bit)
     #endif
     #if PLATFORM_x64 || PLATFORM_AnyCPU
     return(UTF8Marshaler.NativeToManaged(NativeMethods.X64.MagickExceptionHelper_Message(exception)));
     #endif
     #if PLATFORM_AnyCPU
     else
     #endif
     #if PLATFORM_x86 || PLATFORM_AnyCPU
     return(UTF8Marshaler.NativeToManaged(NativeMethods.X86.MagickExceptionHelper_Message(exception)));
     #endif
 }
Пример #6
0
 public static string Description(IntPtr exception)
 {
   #if ANYCPU
   if (NativeLibrary.Is64Bit)
   #endif
   #if WIN64 || ANYCPU
   return UTF8Marshaler.NativeToManaged(NativeMethods.X64.MagickExceptionHelper_Description(exception));
   #endif
   #if ANYCPU
   else
   #endif
   #if !WIN64 || ANYCPU
   return UTF8Marshaler.NativeToManaged(NativeMethods.X86.MagickExceptionHelper_Description(exception));
   #endif
 }
Пример #7
0
 public static string?Description(IntPtr exception)
 {
     #if PLATFORM_AnyCPU
     if (OperatingSystem.Is64Bit)
     #endif
     #if PLATFORM_x64 || PLATFORM_AnyCPU
     return(UTF8Marshaler.NativeToManaged(NativeMethods.X64.MagickExceptionHelper_Description(exception)));
     #endif
     #if PLATFORM_AnyCPU
     else
     #endif
     #if PLATFORM_x86 || PLATFORM_AnyCPU
     return(UTF8Marshaler.NativeToManaged(NativeMethods.X86.MagickExceptionHelper_Description(exception)));
     #endif
 }
Пример #8
0
 public static string?GetFontName(IntPtr instance, int index)
 {
     #if PLATFORM_AnyCPU
     if (OperatingSystem.Is64Bit)
     #endif
     #if PLATFORM_x64 || PLATFORM_AnyCPU
     return(UTF8Marshaler.NativeToManaged(NativeMethods.X64.Magick_GetFontName(instance, (UIntPtr)index)));
     #endif
     #if PLATFORM_AnyCPU
     else
     #endif
     #if PLATFORM_x86 || PLATFORM_AnyCPU
     return(UTF8Marshaler.NativeToManaged(NativeMethods.X86.Magick_GetFontName(instance, (UIntPtr)index)));
     #endif
 }
Пример #9
0
            public static string?GetFontFamily(IntPtr instance, int index)
            {
                IntPtr result;

                #if PLATFORM_AnyCPU
                if (OperatingSystem.IsArm64)
                #endif
                #if PLATFORM_arm64 || PLATFORM_AnyCPU
                result = NativeMethods.ARM64.Magick_GetFontFamily(instance, (UIntPtr)index);
                #endif
                #if PLATFORM_AnyCPU
                else if (OperatingSystem.Is64Bit)
                #endif
                #if PLATFORM_x64 || PLATFORM_AnyCPU
                result = NativeMethods.X64.Magick_GetFontFamily(instance, (UIntPtr)index);
                #endif
                #if PLATFORM_AnyCPU
                else
                #endif
                #if PLATFORM_x86 || PLATFORM_AnyCPU
                result = NativeMethods.X86.Magick_GetFontFamily(instance, (UIntPtr)index);
                #endif
                return(UTF8Marshaler.NativeToManaged(result));
            }
Пример #10
0
            public static string?Description(IntPtr exception)
            {
                IntPtr result;

                #if PLATFORM_AnyCPU
                if (OperatingSystem.IsArm64)
                #endif
                #if PLATFORM_arm64 || PLATFORM_AnyCPU
                result = NativeMethods.ARM64.MagickExceptionHelper_Description(exception);
                #endif
                #if PLATFORM_AnyCPU
                else if (OperatingSystem.Is64Bit)
                #endif
                #if PLATFORM_x64 || PLATFORM_AnyCPU
                result = NativeMethods.X64.MagickExceptionHelper_Description(exception);
                #endif
                #if PLATFORM_AnyCPU
                else
                #endif
                #if PLATFORM_x86 || PLATFORM_AnyCPU
                result = NativeMethods.X86.MagickExceptionHelper_Description(exception);
                #endif
                return(UTF8Marshaler.NativeToManaged(result));
            }