News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Dll function caller

Started by Vortex, August 16, 2022, 05:28:27 AM

Previous topic - Next topic

Vortex

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.

quarantined

What would this be used for that is better than simply calling the exported function itself?


Vortex

Hi swordfish,

CallDllFunc is more functional than the similar Windows component rundll32. My tool can be used for batch file programming.

quarantined

Ah, ok. Since there was only a sparse description I was curious as to its usage. Thank you Vortex.

Greenhorn

This is a nice one. Small and very useful.  :thumbsup:

Thanks, Erol !
Kole Feut un Nordenwind gift en krusen Büdel un en lütten Pint.

Biterider

Hi Vortex
Nice Swiss Army knife  :thumbsup:

Biterider

hutch--


TimoVJL

Useful tool for those, who don't want use vbs.
MessageBox with buttons can used to make choices.
May the source be with you