For more information about how Invoke works:
http://msdn.microsoft.com/library/default.asp?url...htm/chap5_61id.asp
Please keep in mind that the arguments you get passed trough params are IN REVERSE ORDER!
Another trick to make it easier is to save the typelibrary of the DMessengerEvents object,
then make a class that has DMessengerEvents as public parent,
then on creation load the typelibrary using CreateTypeLib, and use ITypeLib::GetTypeInfo to get the type info.
then pass on all Invoke and GetIDsByNames etc on to that ITypeInfo, and you can just use the simple functions of the class instead of implementing the dodgy Invoke call