Skip to content

Instantly share code, notes, and snippets.

@rolfbjarne
Created October 25, 2012 21:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rolfbjarne/07491da9df9ba9c26ec1 to your computer and use it in GitHub Desktop.
Save rolfbjarne/07491da9df9ba9c26ec1 to your computer and use it in GitHub Desktop.
// 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