BINGO!  You can pass the $pRuntimeID parameter directly to the SafeArrayGetElement function defined in SafeArray.au3. It looks like there is an incorrectly-specified type in that function though.  According to the MSDN documentation, the HRESULT returned by the SafeArrayGetElement function in the ole32.dll is a long, not an int. So I made the following change to the DllCall line in the SafeArrayGetElement function in SafeArray.au3: I changed Local $aRet = DllCall( "oleaut32.dll", "int"