I had some success with Lexikos' idea using a single function

Thanks again, Lexikos!
In the process of adapting the idea to local code I noticed that A_ScriptParams doesn't seem to be available within functions in the same way that A_AhkVersion and other such variables are. Using 'global' seemed to allow access.
Is this by design? Or may be there's some pilot error here
Below is some code that reproduces here (Windows XP Pro SP3, HotkeyIt ahkdll 1.0.48.05.L52H17, ReleaseA directory):
ascriptparamstest.ahk
Code:
; for A_AhkVersion: 1.0.48.05.L52H17
DllPath := A_ScriptDir . "\AutoHotkey.dll"
MsgBox, % "Please have something like DbgView.exe running before "
. "clicking the button."
OutputDebug, % "----"
OutputDebug, % "Dll Path: " . DllPath
OutputDebug, % "----"
Sleep, 1
handleLibrary
:= DllCall("LoadLibrary"
, "Str", DllPath)
handleThread
:= DllCall(DllPath . "\ahkdll"
, "Str", A_ScriptDir . "\ascriptparamstesthelper.ahk"
, "Str", ""
, "Str", "test test and test"
, "Cdecl UInt")
Sleep, 1
R1
:= DllCall(DllPath . "\ahkFunction"
, "Str", "OutputSomeVars"
, "Cdecl Str")
Sleep, 1
R2
:= DllCall(DllPath . "\ahkFunction"
, "Str", "OutputSomeVars2"
, "Cdecl Str")
Return
ascriptparamstesthelper.ahk
Code:
; for A_AhkVersion: 1.0.48.05.L52H17
#Persistent
OutputDebug, % "Outside a function"
OutputDebug, % " A_ScriptParams: " . A_ScriptParams
OutputDebug, % " A_AhkVersion: " . A_AhkVersion
OutputDebug, % "----"
OutputSomeVars()
{
OutputDebug, % "Inside a function"
OutputDebug, % " A_ScriptParams: " . A_ScriptParams
OutputDebug, % " A_AhkVersion: " . A_AhkVersion
OutputDebug, % "----"
}
OutputSomeVars2()
{
global A_ScriptParams
OutputDebug, % "Inside a function (2)"
OutputDebug, % " A_ScriptParams: " . A_ScriptParams
OutputDebug, % " A_AhkVersion: " . A_AhkVersion
OutputDebug, % "----"
}