public override void Stop()
 {
     if (m_engineHandle != IntPtr.Zero)
     {
         NativeMethods64.fe_ctl_stop(m_engineHandle);
     }
 }
Exemplo n.º 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));
 }
        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.");
            }
        }
Exemplo n.º 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));
        }
        public override bool Start()
        {
            if (m_engineHandle != IntPtr.Zero)
            {
                return(NativeMethods64.fe_ctl_start(m_engineHandle));
            }

            return(false);
        }
Exemplo n.º 6
0
 public static ImageMetadata LoadMetadataFromMemory(IntPtr dataPointer, int dataLength)
 {
     if (IntPtr.Size == 8)
     {
         return(NativeMethods64.LoadMetadataFromMemory(dataPointer, dataLength));
     }
     else
     {
         return(NativeMethods32.LoadMetadataFromMemory(dataPointer, dataLength));
     }
 }
Exemplo n.º 7
0
 public static ImageMetadata LoadMetadataFromFile(string path)
 {
     if (IntPtr.Size == 8)
     {
         return(NativeMethods64.LoadMetadataFromFile(path));
     }
     else
     {
         return(NativeMethods32.LoadMetadataFromFile(path));
     }
 }
Exemplo n.º 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);
     }
 }
Exemplo n.º 9
0
 public static void DropPixmap(IntPtr ctx, IntPtr pix)
 {
     if (Is64)
     {
         NativeMethods64.DropPixmap(ctx, pix);
     }
     else
     {
         NativeMethods32.DropPixmap(ctx, pix);
     }
 }
Exemplo n.º 10
0
 public static void FreePage(IntPtr doc, IntPtr page)
 {
     if (Is64)
     {
         NativeMethods64.FreePage(doc, page);
     }
     else
     {
         NativeMethods32.FreePage(doc, page);
     }
 }
Exemplo n.º 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);
     }
 }
Exemplo n.º 12
0
 public bool IsAvailable()
 {
     if (Environment.Is64BitProcess)
     {
         return(NativeMethods64.nvdaController_testIfRunning() == 0);
     }
     else
     {
         return(NativeMethods32.nvdaController_testIfRunning() == 0);
     }
 }
Exemplo n.º 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);
     }
 }
Exemplo n.º 14
0
 public static void bufrelease(IntPtr buf)
 {
     if (Is64)
     {
         NativeMethods64.bufrelease(buf);
     }
     else
     {
         NativeMethods32.bufrelease(buf);
     }
 }
Exemplo n.º 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);
     }
 }
Exemplo n.º 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);
     }
 }
Exemplo n.º 17
0
 public static void sd_markdown_free(IntPtr ptr)
 {
     if (Is64)
     {
         NativeMethods64.sd_markdown_free(ptr);
     }
     else
     {
         NativeMethods32.sd_markdown_free(ptr);
     }
 }
Exemplo n.º 18
0
 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));
     }
 }
Exemplo n.º 19
0
 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));
     }
 }
Exemplo n.º 20
0
            /*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));
                }
            }
Exemplo n.º 21
0
 public void StopSpeaking()
 {
     if (Environment.Is64BitProcess)
     {
         NativeMethods64.nvdaController_cancelSpeech();
     }
     else
     {
         NativeMethods32.nvdaController_cancelSpeech();
     }
 }
Exemplo n.º 22
0
 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));
     }
 }
Exemplo n.º 23
0
 public static void FreeDevice(IntPtr dev)
 {
     if (Is64)
     {
         NativeMethods64.FreeDevice(dev);
     }
     else
     {
         NativeMethods32.FreeDevice(dev);
     }
 }
Exemplo n.º 24
0
 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));
     }
 }
Exemplo n.º 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);
     }
 }
Exemplo n.º 26
0
 public static void bufputc(IntPtr buf, byte c)
 {
     if (Is64)
     {
         NativeMethods64.bufputc(buf, c);
     }
     else
     {
         NativeMethods64.bufputc(buf, c);
     }
 }
Exemplo n.º 27
0
 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));
     }
 }
Exemplo n.º 28
0
 public static void bufslurp(IntPtr buf, IntPtr size)
 {
     if (Is64)
     {
         NativeMethods64.bufslurp(buf, size);
     }
     else
     {
         NativeMethods32.bufslurp(buf, size);
     }
 }
Exemplo n.º 29
0
 public static void DeleteImage(IntPtr blob)
 {
     if (IntPtr.Size == 8)
     {
         NativeMethods64.DeleteImage(blob);
     }
     else
     {
         NativeMethods32.DeleteImage(blob);
     }
 }
Exemplo n.º 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);
     }
 }