cs2cpp icon indicating copy to clipboard operation
cs2cpp copied to clipboard

DllImport/Pinvoke support

Open alisci01 opened this issue 7 years ago • 1 comments

figured i try opening issues before i start working on things.

i was planning on tackling this next. my general idea was to generate function pointers for all dllimport functions that initially point to a trampoline that attempts to load the library/function. if it successfully loads, it'll replace the function pointer with what we grabbed, otherwise we throw an exception to mimic the JIT CLR behaviour.

ill probably leave out marshalling on the first pass, mostly because i always avoided it and need to do more proper research on it.

alisci01 avatar Jun 15 '17 01:06 alisci01

having PInvoke would be biggest plus to the project, BTW you can have a look at CoreRT into PInvoke test to see if you can get any ideas

ASDAlexander77 avatar Jun 15 '17 11:06 ASDAlexander77