VERIFIED SOLUTION i

How do I return a string array in my Portrait Dialogue generic plug-in

The IMHGenericPlugin interface in Portrait Dialogue contains methods implemented by Generic Plug-ins. Any custom plug-in code that is written must implement the Execute() method.
The signature of the Execute method is:
    variant Execute (safearray variant Params)

The documentation states that the above method can return any type of data, however, care is needed if you want to return an array of values.
When using .Net code such as C# to write your plug-in, if you want to return an array of values in the variant return type, you should ensure that you use either an object array or a .Net System.Array type.
For example, the last lines of a custom plug-in's Execute method could be:
    object[] myArray = new object[4] { "This", "is", "a", "test" };
    return myArray;

or

    System.Array myArray = new object[] { "This", "is", "a", "test" };
    return myArray;

But the following code will not work and will throw an exception:
    return new string[4] { "This", "is", "a", "test" };

The reason for this is that the return type needs to be able to be converted into the underlying OleVariant type.
 
UPDATED:  March 23, 2017