The MASM Forum
Members Gallery => Showcase => Topic started by: Vortex on August 16, 2022, 05:28:27 AM
-
Here is a small tool to call functions exported by Dlls. To pass numerical arguments, use a leading @ symbol. The environment variable %ERRORLEVEL% stores the value returned by the function called with CallDllFunc.exe :
Usage :
CallDllFunc.exe dllfile.dll function params
A quick example :
Set MB_ICONEXCLAMATION=48
Set MessageBox=MessageBoxA
CallDllFunc.exe msvcrt.dll printf "This is %%s %%u" test @1
CallDllFunc.exe user32.dll %MessageBox% @0 "Message 1" Caption @%MB_ICONEXCLAMATION%
CallDllFunc.exe testdll.dll add @80 @20
CallDllFunc.exe msvcrt.dll printf " 80 + 20 = %%u" @%ERRORLEVEL%
@echo.
-
What would this be used for that is better than simply calling the exported function itself?
-
Hi swordfish,
CallDllFunc is more functional than the similar Windows component rundll32. My tool can be used for batch file programming.
-
Ah, ok. Since there was only a sparse description I was curious as to its usage. Thank you Vortex.
-
This is a nice one. Small and very useful. :thumbsup:
Thanks, Erol !
-
Hi Vortex
Nice Swiss Army knife :thumbsup:
Biterider
-
Nice work Erol. :thumbsup:
-
Useful tool for those, who don't want use vbs.
MessageBox with buttons can used to make choices.