不管听起来多么奇怪,我都需要它 O_o 好吧,另一个解决方案,如果可以将本机 DLL 作为字节数组加载到 RAM 中,但从那里调用函数而不需要 DllImport >_<
有点这样:
byte[] dll_data = File.RealAllBytes("native.dll"); //this is just example, in real architecture bytes comes from another source and should never be stored on HDD
//uhh... ohh... do something to call exported function named "WeirdNativeFunction"