コード例 #1
0
 public override void Stop()
 {
     if (m_engineHandle != IntPtr.Zero)
     {
         NativeMethods64.fe_ctl_stop(m_engineHandle);
     }
 }
コード例 #2
0
 public static IntPtr bufnewcb(IntPtr size, IntPtr malloc, IntPtr realloc, IntPtr free)
 {
     if (Is64)
     {
         return(NativeMethods64.bufnewcb(size, malloc, realloc, free));
     }
     return(NativeMethods32.bufnewcb(size, malloc, realloc, free));
 }
コード例 #3
0
        internal Win64PInvoke(string caBundleAbsPath, ushort preferredHttpListeningPort = 0, ushort preferredHttpsListeningPort = 0) : base(caBundleAbsPath, preferredHttpListeningPort, preferredHttpsListeningPort)
        {
            m_engineHandle = NativeMethods64.fe_ctl_create(NativeFirewallCbReference, caBundleAbsPath, (uint)caBundleAbsPath.Length, preferredHttpListeningPort, preferredHttpsListeningPort, (uint)Environment.ProcessorCount, NativeHttpMsgBeginCbReference, NativeHttpMsgEndCbReference, NativeOnInfoCbReference, NativeOnWarnCbReference, NativeOnErrorCbReference);

            if (m_engineHandle == IntPtr.Zero || m_engineHandle == new IntPtr(-1))
            {
                throw new Exception("Failed to create native engine instance.");
            }
        }
コード例 #4
0
        public static IntPtr sd_markdown_new(uint extensions, IntPtr max_nesting, IntPtr callbacks, IntPtr opaque)
        {
            if (Is64)
            {
                return(NativeMethods64.sd_markdown_new(extensions, max_nesting, callbacks, opaque));
            }

            return(NativeMethods32.sd_markdown_new(extensions, max_nesting, callbacks, opaque));
        }
コード例 #5
0
        public override bool Start()
        {
            if (m_engineHandle != IntPtr.Zero)
            {
                return(NativeMethods64.fe_ctl_start(m_engineHandle));
            }

            return(false);
        }
コード例 #6
0
ファイル: TextureLoader.cs プロジェクト: msruzy/FeralTic-SDX
 public static ImageMetadata LoadMetadataFromMemory(IntPtr dataPointer, int dataLength)
 {
     if (IntPtr.Size == 8)
     {
         return(NativeMethods64.LoadMetadataFromMemory(dataPointer, dataLength));
     }
     else
     {
         return(NativeMethods32.LoadMetadataFromMemory(dataPointer, dataLength));
     }
 }
コード例 #7
0
ファイル: TextureLoader.cs プロジェクト: msruzy/FeralTic-SDX
 public static ImageMetadata LoadMetadataFromFile(string path)
 {
     if (IntPtr.Size == 8)
     {
         return(NativeMethods64.LoadMetadataFromFile(path));
     }
     else
     {
         return(NativeMethods32.LoadMetadataFromFile(path));
     }
 }
コード例 #8
0
 public static void sd_version(out int major, out int minor, out int revision)
 {
     if (Is64)
     {
         NativeMethods64.sd_version(out major, out minor, out revision);
     }
     else
     {
         NativeMethods32.sd_version(out major, out minor, out revision);
     }
 }
コード例 #9
0
 public static void DropPixmap(IntPtr ctx, IntPtr pix)
 {
     if (Is64)
     {
         NativeMethods64.DropPixmap(ctx, pix);
     }
     else
     {
         NativeMethods32.DropPixmap(ctx, pix);
     }
 }
コード例 #10
0
 public static void FreePage(IntPtr doc, IntPtr page)
 {
     if (Is64)
     {
         NativeMethods64.FreePage(doc, page);
     }
     else
     {
         NativeMethods32.FreePage(doc, page);
     }
 }
コード例 #11
0
 public static void ClearPixmap(IntPtr ctx, IntPtr pix, int byteValue)
 {
     if (Is64)
     {
         NativeMethods64.ClearPixmap(ctx, pix, byteValue);
     }
     else
     {
         NativeMethods32.ClearPixmap(ctx, pix, byteValue);
     }
 }
コード例 #12
0
ファイル: NvdaOutput.cs プロジェクト: SaqibS/AccessibleOutput
 public bool IsAvailable()
 {
     if (Environment.Is64BitProcess)
     {
         return(NativeMethods64.nvdaController_testIfRunning() == 0);
     }
     else
     {
         return(NativeMethods32.nvdaController_testIfRunning() == 0);
     }
 }
コード例 #13
0
 public static void sdhtml_toc_renderer(ref md_callbacks callbacks, IntPtr options, uint render_flags)
 {
     if (Is64)
     {
         NativeMethods64.sdhtml_toc_renderer(ref callbacks, options, render_flags);
     }
     else
     {
         NativeMethods32.sdhtml_toc_renderer(ref callbacks, options, render_flags);
     }
 }
コード例 #14
0
 public static void bufrelease(IntPtr buf)
 {
     if (Is64)
     {
         NativeMethods64.bufrelease(buf);
     }
     else
     {
         NativeMethods32.bufrelease(buf);
     }
 }
コード例 #15
0
 public static void sdhtml_smartypants(IntPtr buf, IntPtr text, IntPtr size)
 {
     if (Is64)
     {
         NativeMethods64.sdhtml_smartypants(buf, text, size);
     }
     else
     {
         NativeMethods32.sdhtml_smartypants(buf, text, size);
     }
 }
コード例 #16
0
 public static void sd_markdown_render(IntPtr buf, IntPtr document, IntPtr documentSize, IntPtr md)
 {
     if (Is64)
     {
         NativeMethods64.sd_markdown_render(buf, document, documentSize, md);
     }
     else
     {
         NativeMethods32.sd_markdown_render(buf, document, documentSize, md);
     }
 }
コード例 #17
0
 public static void sd_markdown_free(IntPtr ptr)
 {
     if (Is64)
     {
         NativeMethods64.sd_markdown_free(ptr);
     }
     else
     {
         NativeMethods32.sd_markdown_free(ptr);
     }
 }
コード例 #18
0
ファイル: TextureLoader.cs プロジェクト: msruzy/FeralTic-SDX
 public static long LoadTextureFromFile(IntPtr device, string path, out IntPtr resource, int miplevels)
 {
     if (IntPtr.Size == 8)
     {
         return(NativeMethods64.LoadTextureFromFile(device, path, out resource, miplevels));
     }
     else
     {
         return(NativeMethods32.LoadTextureFromFile(device, path, out resource, miplevels));
     }
 }
コード例 #19
0
ファイル: TextureLoader.cs プロジェクト: msruzy/FeralTic-SDX
 public static long SaveTextureToFile(IntPtr device, IntPtr context, IntPtr resource, string path, int format)
 {
     if (IntPtr.Size == 8)
     {
         return(NativeMethods64.SaveTextureToFile(device, context, resource, path, format));
     }
     else
     {
         return(NativeMethods32.SaveTextureToFile(device, context, resource, path, format));
     }
 }
コード例 #20
0
ファイル: TextureLoader.cs プロジェクト: msruzy/FeralTic-SDX
            /*public static long SaveCompressedTextureToFile(IntPtr device, IntPtr context, IntPtr resource, string path, int blocktype)
             * {
             *  if (IntPtr.Size == 8)
             *  {
             *      return NativeMethods64.SaveCompressedTextureToFile(device, context, resource, path, blocktype);
             *  }
             *  else
             *  {
             *      return NativeMethods32.SaveCompressedTextureToFile(device, context, resource, path, blocktype);
             *  }
             * }*/

            public static long LoadTextureFromMemory(IntPtr device, IntPtr dataPointer, int dataLength, out IntPtr resource)
            {
                if (IntPtr.Size == 8)
                {
                    return(NativeMethods64.LoadTextureFromMemory(device, dataPointer, dataLength, out resource));
                }
                else
                {
                    return(NativeMethods32.LoadTextureFromMemory(device, dataPointer, dataLength, out resource));
                }
            }
コード例 #21
0
ファイル: NvdaOutput.cs プロジェクト: SaqibS/AccessibleOutput
 public void StopSpeaking()
 {
     if (Environment.Is64BitProcess)
     {
         NativeMethods64.nvdaController_cancelSpeech();
     }
     else
     {
         NativeMethods32.nvdaController_cancelSpeech();
     }
 }
コード例 #22
0
ファイル: TextureLoader.cs プロジェクト: msruzy/FeralTic-SDX
 public static long SaveCompressedTextureToFile(IntPtr device, IntPtr context, IntPtr resource, string path, int blocktype)
 {
     if (IntPtr.Size == 8)
     {
         return(NativeMethods64.SaveCompressedTextureToFile(device, context, resource, path, blocktype));
     }
     else
     {
         return(NativeMethods32.SaveCompressedTextureToFile(device, context, resource, path, blocktype));
     }
 }
コード例 #23
0
 public static void FreeDevice(IntPtr dev)
 {
     if (Is64)
     {
         NativeMethods64.FreeDevice(dev);
     }
     else
     {
         NativeMethods32.FreeDevice(dev);
     }
 }
コード例 #24
0
ファイル: TextureLoader.cs プロジェクト: msruzy/FeralTic-SDX
 public static long SaveCompressedTextureToMemoryNoHeader(IntPtr device, IntPtr context, IntPtr resource, int blocktype, out IntPtr data, out int size, out IntPtr blobPtr)
 {
     if (IntPtr.Size == 8)
     {
         return(NativeMethods64.SaveCompressedTextureToMemoryNoHeader(device, context, resource, blocktype, out data, out size, out blobPtr));
     }
     else
     {
         return(NativeMethods32.SaveCompressedTextureToMemoryNoHeader(device, context, resource, blocktype, out data, out size, out blobPtr));
     }
 }
コード例 #25
0
 public static void RunPage(IntPtr doc, IntPtr page, IntPtr dev, Matrix transform, IntPtr cookie)
 {
     if (Is64)
     {
         NativeMethods64.RunPage(doc, page, dev, transform, cookie);
     }
     else
     {
         NativeMethods32.RunPage(doc, page, dev, transform, cookie);
     }
 }
コード例 #26
0
 public static void bufputc(IntPtr buf, byte c)
 {
     if (Is64)
     {
         NativeMethods64.bufputc(buf, c);
     }
     else
     {
         NativeMethods64.bufputc(buf, c);
     }
 }
コード例 #27
0
ファイル: TextureLoader.cs プロジェクト: msruzy/FeralTic-SDX
 public static long SaveTextureToMemory(IntPtr device, IntPtr context, IntPtr resource, int format, out IntPtr data, out int size, out IntPtr blobPtr)
 {
     if (IntPtr.Size == 8)
     {
         return(NativeMethods64.SaveTextureToMemory(device, context, resource, format, out data, out size, out blobPtr));
     }
     else
     {
         return(NativeMethods32.SaveTextureToMemory(device, context, resource, format, out data, out size, out blobPtr));
     }
 }
コード例 #28
0
 public static void bufslurp(IntPtr buf, IntPtr size)
 {
     if (Is64)
     {
         NativeMethods64.bufslurp(buf, size);
     }
     else
     {
         NativeMethods32.bufslurp(buf, size);
     }
 }
コード例 #29
0
ファイル: TextureLoader.cs プロジェクト: msruzy/FeralTic-SDX
 public static void DeleteImage(IntPtr blob)
 {
     if (IntPtr.Size == 8)
     {
         NativeMethods64.DeleteImage(blob);
     }
     else
     {
         NativeMethods32.DeleteImage(blob);
     }
 }
コード例 #30
0
 public static void bufput(IntPtr buf, IntPtr buffer, IntPtr size)
 {
     if (Is64)
     {
         NativeMethods64.bufput(buf, buffer, size);
     }
     else
     {
         NativeMethods32.bufput(buf, buffer, size);
     }
 }