public static void Initialize() { if (AppKitLibrary != IntPtr.Zero) { return; } AppKitLibrary = NS.LoadLibrary("/System/Library/Frameworks/AppKit.framework/AppKit"); FoundationLibrary = NS.LoadLibrary("/System/Library/Frameworks/Foundation.framework/Foundation"); }
public static IntPtr GetStringConstant(IntPtr handle, string symbol) { var indirect = NS.GetSymbol(handle, symbol); if (indirect == IntPtr.Zero) { return(IntPtr.Zero); } var actual = Marshal.ReadIntPtr(indirect); if (actual == IntPtr.Zero) { return(IntPtr.Zero); } return(actual); }
public IntPtr GetAddress(IntPtr function) { return(NS.GetAddress(function)); }
public IntPtr GetAddress(string function) { return(NS.GetAddress(function)); }