Type a page name and press Enter. You'll jump to the page if it exists, or you can create it if it doesn't.
To create a page in a module other than Structures, prefix the name with the module name and a period.
TRUSTEE (Structures)
.
C# Definition:
private enum MULTIPLE_TRUSTEE_OPERATION
[StructLayout(LayoutKind.Sequential, CharSet=CharSet.Auto, Pack=4)]
struct TRUSTEE
{
NO_MULTIPLE_TRUSTEE,
TRUSTEE_IS_IMPERSONATE
IntPtr pMultipleTrustee; // must be null
int MultipleTrusteeOperation;
int TrusteeForm;
int TrusteeType;
[MarshalAs(UnmanagedType.LPTStr)]
string ptstrName;
}
VB Definition:
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Auto, Pack:=4)> _
Public Structure TRUSTEE
Dim pMultipleTrustee As IntPtr ' must be null
Dim MultipleTrusteeOperation As Integer
Dim TrusteeForm As Integer
Dim TrusteeType As Integer
<Some Marshalling attribute here>
Dim ptstrName As String
End Structure
//Platform independent (32 & 64 bit) - use Pack = 0 for both platforms. IntPtr works as well.
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto, Pack = 0)]
private struct TRUSTEE : IDisposable
{
public IntPtr pMultipleTrustee;
public MULTIPLE_TRUSTEE_OPERATION MultipleTrusteeOperation;
public TRUSTEE_FORM TrusteeForm;
public TRUSTEE_TYPE TrusteeType;
private IntPtr ptstrName;
void IDisposable.Dispose()
{
if (ptstrName != IntPtr.Zero) Marshal.Release(ptstrName);
}
public string Name { get { return Marshal.PtrToStringAuto(ptstrName); } }
}
VB Definition:
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Auto, Pack:=4)> _
Public Structure TRUSTEE
Dim pMultipleTrustee As IntPtr ' must be null
Dim MultipleTrusteeOperation As Integer
Dim TrusteeForm As Integer
Dim TrusteeType As Integer
<Some Marshalling attribute here>
Dim ptstrName As String
End Structure
User-Defined Field Types:
None.
Notes:
ptstrName is actually a LPTSTR in windows API (whereas string in .NET is unicode), so a marshalling attribute is needed to make it work.
Please edit this page!
Do you have...
helpful tips?
corrections to the existing content?
alternate definitions?
additional languages you want to include?
Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing any supporting types needed.