If I have these three examples below. I just want to make sure that I have
understood this correct.
In the first example //Applied to a parameter. This will mean that the first
parameter if of type LPWStr because the
parameter msg is type converted to type LPWStr.
In the second example //Applied to a field within a class. This will mean
that the field msg is type converted to type LPWStr
In the third example //Applied to a return value. This will mean that the
returned type is type converted to type LPWStr
//Applied to a parameter.
public void M1 ([MarshalAs(UnmanagedType.LPWStr)]String msg);
//Applied to a field within a class.
class MsgText
{
[MarshalAs(UnmanagedType.LPWStr)] Public String msg;
}
//Applied to a return value.
[return: MarshalAs(UnmanagedType.LPWStr)]
public String GetMessage();
//Tony