Advertisement
Guest User

Untitled

a guest
Jan 17th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. private static ImportedFunction func_doAThing;
  2. private delegate void DelegatedoAThing( int foo, float bar );
  3. public static void doAThing( int foo, float bar )
  4. {
  5. if( func_doAThing == null ) func_doAThing = new ImportedFunction( "anothertestobject.doAThing", "void(int32_t, float)" );
  6. DelegatedoAThing call = (DelegatedoAThing)System.Runtime.InteropServices.Marshal.GetDelegateForFunctionPointer( func_doAThing.FuncPtr, typeof( DelegatedoAThing ) );
  7. call( foo, bar );
  8. }
  9. //------------------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement