107 references to OffsetOf
mscorlib (4)
system\runtime\interopservices\marshal.cs (1)
296
return
OffsetOf
(typeof(T), fieldName);
system\security\principal\windowsidentity.cs (3)
574
pGroups.ReadArray((uint)Marshal.
OffsetOf
(typeof(Win32Native.TOKEN_GROUPS), "Groups").ToInt32(),
1334
IntPtr pSidAndAttributes = new IntPtr((long)safeAllocHandle.DangerousGetHandle() + (long)Marshal.
OffsetOf
(typeof(Win32Native.TOKEN_GROUPS), "Groups"));
1392
IntPtr pSidAndAttributes = new IntPtr((long)safeAllocHandle.DangerousGetHandle() + (long)Marshal.
OffsetOf
(typeof(Win32Native.TOKEN_GROUPS), "Groups"));
System (18)
net\System\Net\_DigestClient.cs (8)
1147
private static int InitiatorTypeOffset = (int)Marshal.
OffsetOf
(typeof(SecChannelBindings), "dwInitiatorAddrType");
1148
private static int InitiatorLengthOffset = (int)Marshal.
OffsetOf
(typeof(SecChannelBindings), "cbInitiatorLength");
1149
private static int InitiatorOffsetOffset = (int)Marshal.
OffsetOf
(typeof(SecChannelBindings), "dwInitiatorOffset");
1150
private static int AcceptorTypeOffset = (int)Marshal.
OffsetOf
(typeof(SecChannelBindings), "dwAcceptorAddrType");
1151
private static int AcceptorLengthOffset = (int)Marshal.
OffsetOf
(typeof(SecChannelBindings), "cbAcceptorLength");
1152
private static int AcceptorOffsetOffset = (int)Marshal.
OffsetOf
(typeof(SecChannelBindings), "dwAcceptorOffset");
1153
private static int ApplicationDataLengthOffset = (int)Marshal.
OffsetOf
(typeof(SecChannelBindings), "cbApplicationDataLength");
1154
private static int ApplicationDataOffsetOffset = (int)Marshal.
OffsetOf
(typeof(SecChannelBindings), "dwApplicationDataOffset");
net\System\Net\_SSPIWrapper.cs (8)
869
internal static readonly int NegotiationStateOffest = (int)Marshal.
OffsetOf
(typeof(NegotiationInfo), "NegotiationState");
931
internal static readonly int NameOffest = (int)Marshal.
OffsetOf
(typeof(SecurityPackageInfo), "Name");
954
Capabilities = Marshal.ReadInt32(unmanagedAddress, (int)Marshal.
OffsetOf
(typeof(SecurityPackageInfo),"Capabilities"));
955
Version = Marshal.ReadInt16(unmanagedAddress, (int)Marshal.
OffsetOf
(typeof(SecurityPackageInfo),"Version"));
956
RPCID = Marshal.ReadInt16(unmanagedAddress, (int)Marshal.
OffsetOf
(typeof(SecurityPackageInfo),"RPCID"));
957
MaxToken = Marshal.ReadInt32(unmanagedAddress, (int)Marshal.
OffsetOf
(typeof(SecurityPackageInfo),"MaxToken"));
961
unmanagedString = Marshal.ReadIntPtr(unmanagedAddress, (int)Marshal.
OffsetOf
(typeof(SecurityPackageInfo),"Name"));
967
unmanagedString = Marshal.ReadIntPtr(unmanagedAddress, (int)Marshal.
OffsetOf
(typeof(SecurityPackageInfo),"Comment"));
net\System\Net\HttpListener.cs (2)
2425
IntPtr tokenPointer = Marshal.ReadIntPtr((IntPtr)blob, (int)Marshal.
OffsetOf
(ChannelBindingStatusType, "ChannelToken"));
2434
return Marshal.ReadInt32(blob, (int)Marshal.
OffsetOf
(ChannelBindingStatusType, "ChannelTokenSize"));
System.Core (2)
System\Security\Cryptography\X509Certificates\ECDsaCertificateExtensions.cs (2)
47
(long)Marshal.
OffsetOf
(typeof(X509Native.CERT_INFO), "SubjectPublicKeyInfo"));
121
(long)Marshal.
OffsetOf
(typeof(X509Native.CERT_INFO), "SubjectPublicKeyInfo"));
System.Data (11)
fx\src\data\System\Data\OleDb\OLEDB_Util.cs (8)
517
static internal readonly int OffsetOf_tagDBPROP_Status = Marshal.
OffsetOf
(typeof(tagDBPROP), "dwStatus").ToInt32();
518
static internal readonly int OffsetOf_tagDBPROP_Value = Marshal.
OffsetOf
(typeof(tagDBPROP), "vValue").ToInt32();
519
static internal readonly int OffsetOf_tagDBPROPSET_Properties = Marshal.
OffsetOf
(typeof(tagDBPROPSET), "rgProperties").ToInt32();
520
static internal readonly int OffsetOf_tagDBPROPINFO_Value = Marshal.
OffsetOf
(typeof(tagDBPROPINFO), "vValue").ToInt32();
521
static internal readonly int OffsetOf_tagDBPROPIDSET_PropertySet = Marshal.
OffsetOf
(typeof(tagDBPROPIDSET), "guidPropertySet").ToInt32();
522
static internal readonly int OffsetOf_tagDBLITERALINFO_it = Marshal.
OffsetOf
(typeof(tagDBLITERALINFO), "it").ToInt32();
523
static internal readonly int OffsetOf_tagDBBINDING_obValue = Marshal.
OffsetOf
(typeof(tagDBBINDING), "obValue").ToInt32();
524
static internal readonly int OffsetOf_tagDBBINDING_wType = Marshal.
OffsetOf
(typeof(tagDBBINDING), "wType").ToInt32();
fx\src\data\System\Data\Sql\sqlnorm.cs (1)
92
int offset = Marshal.
OffsetOf
(fi.DeclaringType, fi.Name).ToInt32();
fx\src\data\System\Data\SQLTypes\SQLFileStream.cs (2)
1082
System.Diagnostics.Debug.Assert(Marshal.
OffsetOf
(typeof(UnsafeNativeMethods.FILE_FULL_EA_INFORMATION), "EaName").ToInt64() <= (Int64) Int32.MaxValue);
1083
int cbOffset = Marshal.
OffsetOf
(typeof(UnsafeNativeMethods.FILE_FULL_EA_INFORMATION), "EaName").ToInt32();
System.IdentityModel (10)
System\IdentityModel\Claims\WindowsClaimSet.cs (1)
284
IntPtr pSidAndAttributes = new IntPtr((long)safeAllocHandle.DangerousGetHandle() + (long)Marshal.
OffsetOf
(typeof(TOKEN_GROUPS), "Groups"));
System\IdentityModel\SspiWrapper.cs (9)
88
internal static readonly int NameOffest = (int)Marshal.
OffsetOf
(typeof(SecurityPackageInfo), "Name");
109
internal static readonly int NegotiationStateOffset = (int)Marshal.
OffsetOf
(typeof(NegotiationInfo), "NegotiationState");
120
internal static readonly int SessionkeyOffset = (int)Marshal.
OffsetOf
(typeof(SecPkgContext_SessionKey), "Sessionkey");
175
Capabilities = Marshal.ReadInt32(unmanagedAddress, (int)Marshal.
OffsetOf
(typeof(SecurityPackageInfo), "Capabilities"));
176
Version = Marshal.ReadInt16(unmanagedAddress, (int)Marshal.
OffsetOf
(typeof(SecurityPackageInfo), "Version"));
177
RPCID = Marshal.ReadInt16(unmanagedAddress, (int)Marshal.
OffsetOf
(typeof(SecurityPackageInfo), "RPCID"));
178
MaxToken = Marshal.ReadInt32(unmanagedAddress, (int)Marshal.
OffsetOf
(typeof(SecurityPackageInfo), "MaxToken"));
181
unmanagedString = Marshal.ReadIntPtr(unmanagedAddress, (int)Marshal.
OffsetOf
(typeof(SecurityPackageInfo), "Name"));
187
unmanagedString = Marshal.ReadIntPtr(unmanagedAddress, (int)Marshal.
OffsetOf
(typeof(SecurityPackageInfo), "Comment"));
System.Security (60)
system\security\cryptography\pkcs\envelopedpkcs7.cs (54)
703
IntPtr pcbSize = new IntPtr((long) pKeyInfo + (long) Marshal.
OffsetOf
(typeof(CAPI.CMSG_KEY_TRANS_RECIPIENT_ENCODE_INFO), "cbSize"));
707
IntPtr pKeyEncryptionAlgorithm = new IntPtr((long) pKeyInfo + (long) Marshal.
OffsetOf
(typeof(CAPI.CMSG_KEY_TRANS_RECIPIENT_ENCODE_INFO), "KeyEncryptionAlgorithm"));
714
IntPtr pszObjId = new IntPtr((long) pKeyEncryptionAlgorithm + (long) Marshal.
OffsetOf
(typeof(CAPI.CRYPT_ALGORITHM_IDENTIFIER), "pszObjId"));
718
IntPtr pParameters = new IntPtr((long) pKeyEncryptionAlgorithm + (long) Marshal.
OffsetOf
(typeof(CAPI.CRYPT_ALGORITHM_IDENTIFIER), "Parameters"));
721
IntPtr pcbData = new IntPtr((long) pParameters + (long) Marshal.
OffsetOf
(typeof(CAPI.CRYPTOAPI_BLOB), "cbData"));
725
IntPtr ppbData = new IntPtr((long) pParameters + (long) Marshal.
OffsetOf
(typeof(CAPI.CRYPTOAPI_BLOB), "pbData"));
732
IntPtr pRecipientPublicKey = new IntPtr((long) pKeyInfo + (long) Marshal.
OffsetOf
(typeof(CAPI.CMSG_KEY_TRANS_RECIPIENT_ENCODE_INFO), "RecipientPublicKey"));
735
pcbData = new IntPtr((long) pRecipientPublicKey + (long) Marshal.
OffsetOf
(typeof(CAPI.CRYPT_BIT_BLOB), "cbData"));
739
ppbData = new IntPtr((long) pRecipientPublicKey + (long) Marshal.
OffsetOf
(typeof(CAPI.CRYPT_BIT_BLOB), "pbData"));
743
IntPtr pcUnusedBIts = new IntPtr((long) pRecipientPublicKey + (long) Marshal.
OffsetOf
(typeof(CAPI.CRYPT_BIT_BLOB), "cUnusedBits"));
747
IntPtr pRecipientId = new IntPtr((long) pKeyInfo + (long) Marshal.
OffsetOf
(typeof(CAPI.CMSG_KEY_TRANS_RECIPIENT_ENCODE_INFO), "RecipientId"));
768
IntPtr pdwIdChoice = new IntPtr((long) pRecipientId + (long) Marshal.
OffsetOf
(typeof(CAPI.CERT_ID), "dwIdChoice"));
772
IntPtr pKeyId = new IntPtr((long) pRecipientId + (long) Marshal.
OffsetOf
(typeof(CAPI.CERT_ID), "Value"));
775
pcbData = new IntPtr((long) pKeyId + (long) Marshal.
OffsetOf
(typeof(CAPI.CRYPTOAPI_BLOB), "cbData"));
779
ppbData = new IntPtr((long) pKeyId + (long) Marshal.
OffsetOf
(typeof(CAPI.CRYPTOAPI_BLOB), "pbData"));
784
IntPtr pdwIdChoice = new IntPtr((long) pRecipientId + (long) Marshal.
OffsetOf
(typeof(CAPI.CERT_ID), "dwIdChoice"));
788
IntPtr pIssuerSerialNumber = new IntPtr((long) pRecipientId + (long) Marshal.
OffsetOf
(typeof(CAPI.CERT_ID), "Value"));
791
IntPtr pIssuer = new IntPtr((long) pIssuerSerialNumber + (long) Marshal.
OffsetOf
(typeof(CAPI.CERT_ISSUER_SERIAL_NUMBER), "Issuer"));
794
pcbData = new IntPtr((long) pIssuer + (long) Marshal.
OffsetOf
(typeof(CAPI.CRYPTOAPI_BLOB), "cbData"));
798
ppbData = new IntPtr((long) pIssuer + (long) Marshal.
OffsetOf
(typeof(CAPI.CRYPTOAPI_BLOB), "pbData"));
802
IntPtr pSerialNumber = new IntPtr((long) pIssuerSerialNumber + (long) Marshal.
OffsetOf
(typeof(CAPI.CERT_ISSUER_SERIAL_NUMBER), "SerialNumber"));
805
pcbData = new IntPtr((long) pSerialNumber + (long) Marshal.
OffsetOf
(typeof(CAPI.CRYPTOAPI_BLOB), "cbData"));
809
ppbData = new IntPtr((long) pSerialNumber + (long) Marshal.
OffsetOf
(typeof(CAPI.CRYPTOAPI_BLOB), "pbData"));
818
IntPtr pcbSize = new IntPtr((long) pKeyInfo + (long) Marshal.
OffsetOf
(typeof(CAPI.CMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO), "cbSize"));
822
IntPtr pKeyEncryptionAlgorithm = new IntPtr((long) pKeyInfo + (long) Marshal.
OffsetOf
(typeof(CAPI.CMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO), "KeyEncryptionAlgorithm"));
829
IntPtr pszObjId = new IntPtr((long) pKeyEncryptionAlgorithm + (long) Marshal.
OffsetOf
(typeof(CAPI.CRYPT_ALGORITHM_IDENTIFIER), "pszObjId"));
836
IntPtr pKeyWrapAlgorithm = new IntPtr((long) pKeyInfo + (long) Marshal.
OffsetOf
(typeof(CAPI.CMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO), "KeyWrapAlgorithm"));
849
pszObjId = new IntPtr((long) pKeyWrapAlgorithm + (long) Marshal.
OffsetOf
(typeof(CAPI.CRYPT_ALGORITHM_IDENTIFIER), "pszObjId"));
856
IntPtr pKeyWrapAuxInfo = new IntPtr((long) pKeyInfo + (long) Marshal.
OffsetOf
(typeof(CAPI.CMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO), "pvKeyWrapAuxInfo"));
864
IntPtr pdwKeyChoice = new IntPtr((long) pKeyInfo + (long) Marshal.
OffsetOf
(typeof(CAPI.CMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO), "dwKeyChoice"));
868
IntPtr pEphemeralAlgorithm = new IntPtr((long) pKeyInfo + (long) Marshal.
OffsetOf
(typeof(CAPI.CMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO), "pEphemeralAlgorithmOrSenderId"));
877
pszObjId = new IntPtr((long) encryptParam.rgEphemeralIdentifier[cKeyAgree].DangerousGetHandle() + (long) Marshal.
OffsetOf
(typeof(CAPI.CRYPT_ALGORITHM_IDENTIFIER), "pszObjId"));
881
IntPtr pParameters = new IntPtr((long) encryptParam.rgEphemeralIdentifier[cKeyAgree].DangerousGetHandle() + (long) Marshal.
OffsetOf
(typeof(CAPI.CRYPT_ALGORITHM_IDENTIFIER), "Parameters"));
884
IntPtr pcbData = new IntPtr((long) pParameters + (long) Marshal.
OffsetOf
(typeof(CAPI.CRYPTOAPI_BLOB), "cbData"));
888
IntPtr ppbData = new IntPtr((long) pParameters + (long) Marshal.
OffsetOf
(typeof(CAPI.CRYPTOAPI_BLOB), "pbData"));
894
IntPtr pcRecipientEncryptedKeys = new IntPtr((long) pKeyInfo + (long) Marshal.
OffsetOf
(typeof(CAPI.CMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO), "cRecipientEncryptedKeys"));
899
IntPtr prgpRecipientEncryptedKeys = new IntPtr((long) pKeyInfo + (long) Marshal.
OffsetOf
(typeof(CAPI.CMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO), "rgpRecipientEncryptedKeys"));
905
pcbSize = new IntPtr((long) encryptParam.rgpEncryptedKey[cKeyAgree].DangerousGetHandle() + (long) Marshal.
OffsetOf
(typeof(CAPI.CMSG_RECIPIENT_ENCRYPTED_KEY_ENCODE_INFO), "cbSize"));
909
IntPtr pRecipientPublicKey = new IntPtr((long) encryptParam.rgpEncryptedKey[cKeyAgree].DangerousGetHandle() + (long) Marshal.
OffsetOf
(typeof(CAPI.CMSG_RECIPIENT_ENCRYPTED_KEY_ENCODE_INFO), "RecipientPublicKey"));
912
pcbData = new IntPtr((long) pRecipientPublicKey + (long) Marshal.
OffsetOf
(typeof(CAPI.CRYPT_BIT_BLOB), "cbData"));
916
ppbData = new IntPtr((long) pRecipientPublicKey + (long) Marshal.
OffsetOf
(typeof(CAPI.CRYPT_BIT_BLOB), "pbData"));
920
IntPtr pcUnusedBits = new IntPtr((long) pRecipientPublicKey + (long) Marshal.
OffsetOf
(typeof(CAPI.CRYPT_BIT_BLOB), "cUnusedBits"));
924
IntPtr pRecipientId = new IntPtr((long) encryptParam.rgpEncryptedKey[cKeyAgree].DangerousGetHandle() + (long) Marshal.
OffsetOf
(typeof(CAPI.CMSG_RECIPIENT_ENCRYPTED_KEY_ENCODE_INFO), "RecipientId"));
927
IntPtr pdwIdChoice = new IntPtr((long) pRecipientId + (long) Marshal.
OffsetOf
(typeof(CAPI.CERT_ID), "dwIdChoice"));
933
IntPtr pKeyId = new IntPtr((long) pRecipientId + (long) Marshal.
OffsetOf
(typeof(CAPI.CERT_ID), "Value"));
953
pcbData = new IntPtr((long) pKeyId + (long) Marshal.
OffsetOf
(typeof(CAPI.CRYPTOAPI_BLOB), "cbData"));
957
ppbData = new IntPtr((long) pKeyId + (long) Marshal.
OffsetOf
(typeof(CAPI.CRYPTOAPI_BLOB), "pbData"));
964
IntPtr pIssuerSerial = new IntPtr((long) pRecipientId + (long) Marshal.
OffsetOf
(typeof(CAPI.CERT_ID), "Value"));
967
IntPtr pIssuer = new IntPtr((long) pIssuerSerial + (long) Marshal.
OffsetOf
(typeof(CAPI.CERT_ISSUER_SERIAL_NUMBER), "Issuer"));
970
pcbData = new IntPtr((long) pIssuer + (long) Marshal.
OffsetOf
(typeof(CAPI.CRYPTOAPI_BLOB), "cbData"));
974
ppbData = new IntPtr((long) pIssuer + (long) Marshal.
OffsetOf
(typeof(CAPI.CRYPTOAPI_BLOB), "pbData"));
978
IntPtr pSerialNumber = new IntPtr((long) pIssuerSerial + (long) Marshal.
OffsetOf
(typeof(CAPI.CERT_ISSUER_SERIAL_NUMBER), "SerialNumber"));
981
pcbData = new IntPtr((long) pSerialNumber + (long) Marshal.
OffsetOf
(typeof(CAPI.CRYPTOAPI_BLOB), "cbData"));
985
ppbData = new IntPtr((long) pSerialNumber + (long) Marshal.
OffsetOf
(typeof(CAPI.CRYPTOAPI_BLOB), "pbData"));
system\security\cryptography\pkcs\signerinfo.cs (5)
352
IntPtr pSubjectPublicKeyInfo = new IntPtr((long) pCertContext.pCertInfo + (long) Marshal.
OffsetOf
(typeof(CAPI.CERT_INFO), "SubjectPublicKeyInfo"));
355
IntPtr pAlgorithm = new IntPtr((long) pSubjectPublicKeyInfo + (long) Marshal.
OffsetOf
(typeof(CAPI.CERT_PUBLIC_KEY_INFO), "Algorithm"));
358
IntPtr pParameters = new IntPtr((long) pAlgorithm + (long) Marshal.
OffsetOf
(typeof(CAPI.CRYPT_ALGORITHM_IDENTIFIER), "Parameters"));
371
IntPtr pcbData = new IntPtr((long) pParameters + (long) Marshal.
OffsetOf
(typeof(CAPI.CRYPTOAPI_BLOB), "cbData"));
372
IntPtr ppbData = new IntPtr((long) pParameters + (long) Marshal.
OffsetOf
(typeof(CAPI.CRYPTOAPI_BLOB), "pbData"));
system\security\cryptography\x509\x509ui.cs (1)
127
csc.dwSize = (uint) Marshal.
OffsetOf
(typeof(CAPI.CRYPTUI_SELECTCERTIFICATE_STRUCTW), "hSelectedCertStore");
System.Windows.Forms (1)
winforms\Managed\System\WinForms\HtmlDocument.cs (1)
810
private static readonly int VariantSize = (int)Marshal.
OffsetOf
(typeof(FindSizeOfVariant), "b");
WindowsBase (1)
Shared\MS\Win32\UnsafeNativeMethodsCLR.cs (1)
4036
VariantSize = (int)Marshal.
OffsetOf
(typeof(FindSizeOfVariant), "b");