InnoTools InnoCallback
The InnoCallback DLL allows you to provide Inno Setup [Code] functions to external DLLs (Like the Windows API) as Stdcall callbacks.You will find documentation in the form of an example project in the zip file.
Go to the download page.