OpenByteDev / dll-syringe

A windows dll injection library written in rust.
MIT License
166 stars 14 forks source link

Pass string as argument and read #9

Closed Aporate closed 1 year ago

Aporate commented 1 year ago

Exactly how are you supposed to pass string as an argument and read it on the other end?

OpenByteDev commented 1 year ago

You can use the tests as reference: For the injector consider payload::call_complex in https://github.com/OpenByteDev/dll-syringe/blob/master/tests/rpc.rs For the payload consider the sum(Vec<u64>) from https://github.com/OpenByteDev/dll-syringe/blob/master/tests/helpers/test_payload/src/lib.rs

Aporate commented 1 year ago

And on another note, in release it doesn't seem to work. Seems like optimizations may screw it over.

Using payload procedure macros.

tried setting opt-level = 1, didn't work. Got a crash. Set it to 0, then it worked.

OpenByteDev commented 1 year ago

Works for me in https://github.com/OpenByteDev/burnt-sushi. Could you share your project?