ソースを参照

[cpp] Add getProcAddress for arbitrary functions

Hugh Sanderson 13 年 前
コミット
5d1b7107fd
1 ファイル変更7 行追加0 行削除
  1. 7 0
      std/cpp/Lib.hx

+ 7 - 0
std/cpp/Lib.hx

@@ -37,6 +37,13 @@ class Lib {
 		#end
 		#end
 	}
 	}
 
 
+	/**
+		Load and return a Cpp primitive from a DLL library.
+	**/
+	@:extern public static inline function getProcAddress( lib : String, prim : String ) : Dynamic {
+		return untyped __global__.__hxcpp_cast_get_proc_address(lib,prim);
+	}
+
 	/**
 	/**
 		Tries to load, and always returns a valid function, but the function may throw
 		Tries to load, and always returns a valid function, but the function may throw
 		if called.
 		if called.