I immediately can see a mistake: you use
LPStr
which will marshal 1-byte null-terminated string, but you need platform-dependent string (
LPTSTR
).
Try this:
[DllImport(@".\VideoWrapper.dll")]
public static extern void SetFName(
[MarshalAs(UnmanagedType.LPTStr)]string FName,
int FStart);
—SA