I have been working on this UDF which implements the following features:
- Call any function in any process, including your own - see DllCallEx.
- Runtime linking features using GetRemoteModuleHandle and GetRemoteProcAddress.
Supports:
- stdcall and fastcall
- reference passing
- address-of passing
- static arrays when used with byte*, char* and wchar*
- ProcCall
- ProcCallbackRegister
- ProcCallback
- ProcCallbackFree
- GetRemoteModuleHandle
- GetRemoteModuleList
- OpenProcess
- GetRemoteProcAddress
- DllCallEx
The goal of the UDF was mainly proof-of-concept, extended debugging abilities, learning by doing and enhanced inter process communication.
How does it work?
It evaluates the arguments and assembles a small thread, which pushes the arguments and returns. Really it just automates the process.
Syntax
All the function use DllCall() style. Read documentation.
Examples
A set of basic examples is included.
Notes
This is in an early alpha state, which means that if you want to use this you should have a good idea about how calling conventions work, understand the relation between types and values, and a basic understanding of pointers. If you don't, you'll most likely end up crashing either your or the target process. Only x86 is supported.
Be aware that no in-depth type checking is done, so it's assumed you know what you are doing
To be implemented
- ProcCall returning an array of parameters and return values like DllCall()
- x64 Support
- Better documentation
- Bulletproof return code.
- cdecl support.
Changelog
- 07-08 '11
- Fixed a bug with global deallocations associated with callbacks.
- Callbacks, if return type is void, will not wait for the thread to return (parallel to Run() and RunWait()).
- Added GetRemoteModuleList().
- Rewrote GetRemoteModuleHandle.
- Added an extra param in OpenProcess() and made it public.
- Added more errors and better descriptions.. imo.
- Optimized DllCallEx().
- 22-06 '11
- Fixed a bug when using fastcall convention that would crash the script.
Lmk what you guys think about this
e: aaaand attaching the file lol.
Attached Files
Edited by Shaggi, 07 August 2011 - 02:54 PM.









