typedef int (CALLBACK * PCLOSURE) (HWND hwnd, void (CALLBACK *Fn), LPARAM UI, LPSTR pwd, char type); extern PCLOSURE Closure; void CALLBACK _export PrinterResults(struct RetData far &rtd) {} Closure(NULL, PrinterResults, 0, "0", '2');
[DllImport("f.dll", EntryPoint = "Closure")] unsafe public static extern int Closure(void* hwnd, void* Fn, int UI, string pwd, char type); Closure(null, null, 0, "", '2');