I have a struct like this:
[StructLayout(LayoutKind.Sequential)]
internal struct EVENT_TRACE_PROPERTIES
{
internal WNODE_HEADER WNode;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = (int)EventTracePropertiesStringSize)]
internal string LoggerName;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = (int)EventTracePropertiesStringSize)]
internal string LogFileName;
}
How can I copy a C# string, str to struct memory location pointed by LogFileName ?
You just assign to the field: