title: How would the following c(++)-struct be converted to C# for p/invoke usage
body: <p>Im trying to wrap an older dll and am running into issues representing a structure it uses in C#. Nothing I have tried seems to be working. Any magicians able to help?</p>
  
  <pre><code>typedef struct _PARAM_BYNAME_DATA 
  { 
      n_char *szPntName; /* (in) point name */ 
      n_char *szPrmName; /* (in) parameter name */ 
      n_long nPrmOffset; /* (in) parameter offset */ 
      PARvalue *pupvValue; /* (in/out) parameter value union */ 
      n_ushort nType; /* (in/out) value type */ 
      n_long fStatus; /* (out) status of each value access */ 
  } PARAM_BYNAME_DATA; 
  </code></pre>
  
  <p>If it helps the below is a VB port.</p>
  
  <pre><code>Type param_byname_data 
      point_name As String
      param_name As String
      param_offset As Long
      padding1 As Long 'for byte alignment between VB and C 
       param_value As Variant
      param_type As Integer
      padding2 As Integer 'for byte alignment between VB and C 
      status As Long status As Long 
  End Type
  </code></pre>
  
  <p>And the following Delphi as well...</p>
  
  <pre><code>PARAM_BYNAME_DATA=record
      PntName:pchar;       // (in) point name
      PrmName:pchar;       // (in) parameter name
      PrmOffset:longword;  // (in) parameter offset
      pValue:pointer;      // (out) parameter value union
      nType:word;          // (out) value type
      fStatus:longword;    // (out) status of each value access */
  end;
  </code></pre>