-
-
Save rolfbjarne/07491da9df9ba9c26ec1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Create a new cs file and put this code in it. | |
// Remove the existing api definition for RDPDFGlobal. | |
namespace RDPDFKit { | |
using System; | |
using System.Runtime.InteropServices; | |
using MonoTouch.ObjCRuntime; | |
public unsafe static partial class RDPDFGlobal { | |
static readonly IntPtr __Internal_libraryHandle = Dlfcn.dlopen (null, 0); | |
public static int RDPDFFeatures { | |
get { | |
return Dlfcn.GetInt32 (__Internal_libraryHandle, "RDPDFKitEnabledFeatures"); | |
} | |
set { | |
var indirect = Dlfcn.dlsym (__Internal_libraryHandle, "RDPDFKitEnabledFeatures"); | |
if (indirect == IntPtr.Zero) | |
throw new Exception ("Field 'RDPDFKitEnabledFeatures' not found."); | |
Marshal.WriteInt32 (indirect, value); | |
} | |
} | |
} /* class RDPDFGlobal */ | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment