Desktop Functions: Smart Device Functions:
|
Search Results for "SID" in [All]ntdsapi1: DsCrackNames
// domain object resides in. Thus DS_NAME_RESULT_ITEM?.pDomain
// This is the string representation of a SID. Invalid for formatDesired.
// See sddl.h for SID binary <--> text conversion routines.
DS_SID_OR_SID_HISTORY_NAME = 11, secur32
string _sAccountName = WindowsIdentity.GetCurrent().Name;
public IntPtr PSiD;
if (data.PSiD != IntPtr.Zero)
System.Security.Principal.SecurityIdentifier sid = new System.Security.Principal.SecurityIdentifier(data.PSiD); 4: LsaLogonUser
public System.Security.Principal.WindowsIdentity BuildIdentity()
System.Security.Principal.WindowsIdentity retVal = new System.Security.Principal.WindowsIdentity(m_hToken);
/// <returns>Returns a <c>System.Security.Principal.WindowsIdentity</c> object</returns>
public static System.Security.Principal.WindowsIdentity CreateIdentityS4U(System.Net.NetworkCredential credential, WinLogonType logonType) System.Security.Principal.WindowsIdentity has a constructor that you can use if you know the user's principal name (UPN). It does not work however for domain\username. comdlg325: lorem21 Hey Marty, I'm not your answering service, but you're outside pouting about the car, Jennifer Parker called you twice. Say that again. Calvin, why do you keep calling me Calvin? Marty, you didn't fall asleep, did you? I'm too loud. I can't believe it. I'm never gonna get a chance to play in front of anybody. msi
static extern int MsiDatabaseCommit(IntPtr hDatabase);
Declare Function MsiDatabaseCommit Lib "msi.dll" (TODO) As TODO
static extern int MsiDatabaseOpenView(IntPtr hDatabase, [MarshalAs(UnmanagedType.LPWStr)] string szQuery, out IntPtr phView);
Declare Function MsiDatabaseOpenView Lib "msi.dll" (TODO) As TODO 8: MsiDoAction
string szUserSid,
StringBuilder szTargetUserSid,
ref uint pcchTargetUserSid);
StringBuilder szTargetUserSid = new StringBuilder(300);
uint pcchTargetUserSid = 300;
null, // User SID. null needs if context == MachineContext only (4), it means to use only per-machine installations
szTargetUserSid, // User SID. Indicate owner of this installation. (Here is null)
ref pcchTargetUserSid // Length of user SID 10: MsiEnumProducts
string szUserSid,
string szSid,
ref uint pccSid)
string szSid = new string(new char[300]);
uint pccSid = 300;
uint res = MsiInterop.MsiEnumProductsEx(codeToFind, null, (uint)MsiInterop.MSIINSTALLCONTEXT.MSIINSTALLCONTEXT_USERUNMANAGED, 0, code, out junk, szSid, ref pccSid);
string szUserSid,
string szSid,
ref uint pccSid)
string szSid = new string(new char[300]);
uint pccSid = 300;
uint res = MsiInterop.MsiEnumProductsEx(codeToFind, null, (uint)MsiInterop.MSIINSTALLCONTEXT.MSIINSTALLCONTEXT_USERUNMANAGED, 0, code, out junk, szSid, ref pccSid);
String szUserSid, //pass 'null' to omit.
const uint CURRENT_USER_SID = 0;
CURRENT_USER_SID,
// Query that is extended to all per–user-managed installations for the users that szUserSid specifies.
// Query that is extended to all per–user-unmanaged installations for the users that szUserSid specifies. 13: MsiOpenDatabase The documentation specifies a string for the persist parameter, but any calls to MsiDatabaseCommit are ignored unless this call is given an IntPtr with the desired open mode, e.g. (IntPtr)2. The sample application below demonstrates how to use MsiRecordSetString, MsiOpenDatabase, MsiCreateRecord, MsiCloseHandle, MsiDatabaseOpenView, MsiViewExecute, MsiDatabaseCommit, and MsiViewClose in C# to modify a property value in an MSI database. To run it, simply create a new Windows Console application and replace the code that Visual Studio gives you with the code below. You may have to modify the namespace name. The sample as-is requires a valid MSI database named SETUP.msi, with a property named PROPERTY1 in the Property table, to be located in C:\. You can of course change the path to your MSI database in the calls to ChangeMSIProperty() in Main() and use any existing property you wish.
static extern int MsiDatabaseOpenViewW(IntPtr hDatabase, [MarshalAs(UnmanagedType.LPWStr)] string szQuery, out IntPtr phView);
static extern int MsiDatabaseCommit(IntPtr hDatabase);
const int MSIDBOPEN_READONLY = 0; // database open read-only, no persistent changes
const int MSIDBOPEN_TRANSACT = 1; // database read/write in transaction mode
const int MSIDBOPEN_DIRECT = 2; // database direct read/write without transaction
const int MSIDBOPEN_CREATE = 3; // create new database, transact mode read/write
const int MSIDBOPEN_CREATEDIRECT = 4; // create new database, direct mode read/write
int iOpenMode = MSIDBOPEN_DIRECT;
returnValue = (WINDOWS_MESSAGE_CODES)MsiDatabaseOpenViewW(msiHandle, sql, out msiView);
throw new MsiInstallationSupportException(string.Format(CultureInfo.InvariantCulture, "MsiDatabaseOpenViewW returned error code {0}.", returnValue.ToString()));
returnValue = (WINDOWS_MESSAGE_CODES)MsiDatabaseCommit(msiHandle);
throw new MsiInstallationSupportException(string.Format(CultureInfo.InvariantCulture, "MsiDatabaseCommit returned error code {0}.", returnValue.ToString())); mpr
/// degradation taken into consideration. quickusb16: QuickUSB
LastError = "Unknown error inside WriteData";
LastError = "Unknown error inside WriteData"; gdiplus
Guid clsid;
if(!GetCodecClsid(filename, out clsid))
st = GdipSaveImageToFile(img, filename, ref clsid, IntPtr.Zero); version19: lorem29 A tramping of sea boots was heard in the entry; the door was flung open, and in rolled a wild set of mariners enough. Enveloped in their shaggy watch coats, and with their heads muffled in woollen comforters, all bedarned and ragged, and their beards stiff with icicles, they seemed an eruption of bears from Labrador. They had just landed from their boat, and this was the first house they entered. No wonder, then, that they made a straight wake for the whale's mouth—the bar—when the wrinkled little old Jonah, there officiating, soon poured them out brimmers all round. One complained of a bad cold in his head, upon which Jonah mixed him a pitch-like potion of gin and molasses, which he swore was a sovereign cure for all colds and catarrhs whatsoever, never mind of how long standing, or whether caught off the coast of Labrador, or on the weather side of an ice-island. Structures20: AI
/// The getaddrinfo will resolve only if a global address is configured. The IPv6 and IPv4 loopback address is not considered a valid global address. This option is only supported on Windows Vista or later. 21: CAPTUREPARMS
/// set to AVSTREAMMASTER_AUDIO, the audio stream is considered the master stream and the video stream
''' member is set to AVSTREAMMASTER_AUDIO, the audio stream is considered the master stream 22: DEBUG_EVENT
public int dwProcessId; 23: DOT11_BSSID_LIST
public struct DOT11_BSSID_LIST
IntPtr BSSIDs;
Public Structure DOT11_BSSID_LIST
Public BSSIDs As IntPtr 24: DOT11_SSID
public struct DOT11_SSID
public uint uSSIDLength;
public string ucSSID;
Public Structure DOT11_SSID
Public uSSIDLength As UInteger
Public ucSSID As String 25: FILEDESCRIPTOR
FD_CLSID = 0x00000001,
public Guid clsid;
FD_CLSID = &H1
Public clsid As Guid 26: HEAPENTRY32
internal UInt32 th32ProcessID; 27: HEAPLIST32
internal UInt32 th32ProcessID;
public IntPtr lgrmi2_sid;
public SIDTYPE lgrmi2_sidusage;
// You should already have the HPolicy and SID ready
LsaEnumerateAccountRights(HPolicy, SID, out rightsPtr, out countOfRights); 31: MARGINS
32: MEMORYSTATUS The CLR offer us no way to tell us that memory is getting tight. Many think this API provides the best solution. This is mentioned by Jeffrey Richter in his book 'CLR via C#' ISBN: 0-7356-2163-2. It is useful in determining if your system is under excessive memory load by looking at the dwMemoryLoad member of the MEMORYSTATUSEX structure. If this value is > 80 (per Mr. Richter in his discussion of Garbage Collection), it is an indication that you might want to consider converting some strong references into weak references. Remember that a weakreference type will be collected when Generation 0 is full, so it is not a good technique for caching (as many seem to think). 33: MEMORYSTATUSEX The CLR offer us no way to tell us that memory is getting tight. Many think this API provides the best solution. This is mentioned by Jeffrey Richter in his book 'CLR via C#' ISBN: 0-7356-2163-2. It is useful in determining if your system is under excessive memory load by looking at the dwMemoryLoad member of the MEMORYSTATUSEX structure. If this value is > 80 (per Mr. Richter in his discussion of Garbage Collection), it is an indication that you might want to consider converting some strong references into weak references. Remember that a weakreference type will be collected when Generation 0 is full, so it is not a good technique for caching (as many seem to think).
public uint ProcessId
public uint ProcessId
Public ReadOnly Property ProcessId() As UInteger The winmm dll may not execute properly on 64-bit systems. Consequently, the StructLayout must be Sequential, with CharSet = Ansi, and Pack = 4. This particular type has some special layout considerations (the c union keyword) which typically means developers would use the explicit layout. However, the explicit layout breaks down on 64-bit systems for any type with an IntPtr in the type. Consequently, the C# types have been redesigned to use Sequential layout so that they will automatically adjust to 64-bit systems. This means private fields with public properties which perform the gunky work of making it look like there is a union. 37: NAME_BUFFER Considered Obsolete 38: NCB Considered Obsolete 39: OBJECTDESCRIPTOR
public Guid clsid;
Public clsid As Guid
public UIntPtr UniqueProcessId;
public IntPtr InheritedFromUniqueProcessId;
Public UniqueProcessId As IntPtr
Public InheritedFromUniqueProcessId As IntPtr
public int dwProcessId;
Public dwProcessId As Integer 42: REOBJECT
public Guid clsid;
CLSID clsid;
public IntPtr PSiD; 44: SetServiceStatus PER 'Programming Server-Side Applications for Microsoft Windows 2000' ISBN: 0-7356-0753-245: SID
struct SID_IDENTIFIER_AUTHORITY
public SID_IDENTIFIER_AUTHORITY(byte[] value)
Structure SID_IDENTIFIER_AUTHORITY Used by InitializeSid
struct SID_IDENTIFIER_AUTHORITY
public SID_IDENTIFIER_AUTHORITY(byte[] value)
Structure SID_IDENTIFIER_AUTHORITY Used by InitializeSid 47: STATPROPSETSTG
/// CLSID (GUID) associated with this property set, specified when the property set was initially created
public Guid clsid; 48: TRUSTEE
TRUSTEE_IS_SID,
TRUSTEE_IS_OBJECTS_AND_SID, Is often used as a type inside a USB_NODE_CONNECTION_INFORMATION_EX structure, hence the need for the "Pack=1" This structure is often nested inside the USB_HUB_INFORMATION structure, hence the need for the "pack=1" Often nested inside a USB_NODE_INFORMATION structure There is no Marshal.MemSet method to zero-out the buffer prior to use, so you might consider the following hack 53: USER_INFO
public IntPtr user_sid; // This is a PSID 54: USE_INFO_2
/// <summary>Pointer to a SID structure that contains the security identifier (SID) that uniquely identifies the user.</summary>
public int usri23_user_sid;
Public usri23_user_sid As Integer 55: USE_INFO_23
/// <summary>Pointer to a SID structure that contains the security identifier (SID) that uniquely identifies the user.</summary>
public int usri23_user_sid;
Public usri23_user_sid As Integer 56: USE_INFO_23
/// <summary>Pointer to a SID structure that contains the security identifier (SID) that uniquely identifies the user.</summary>
public int usri23_user_sid;
Public usri23_user_sid As Integer 57: WIN32_FIND_DATA The problem I saw was when the file had no FILETIME information (0) as the file was created on a MAC inside of a ZIP file. When trying to get back to a DateTime using the DateTime.FromFileTimeUtc the DateTime created was 12/31/1979 23:52:50 (seven minutes and ten seconds before 1/1/1980) instead of 1/1/1980 00:00:00. I am in Arizona which always has a seven HOUR offset from GMT so I don't know if that played into the calculation or not (seven minutes vs. seven hours).
/// DOT11_SSID->_DOT11_SSID
public DOT11_SSID dot11Ssid;
public string dot11Bssid;
''' DOT11_SSID->_DOT11_SSID
Public dot11Ssid As DOT11_SSID
Public dot11Bssid As String
public DOT11_SSID[] pDot11Ssid;
public DOT11_BSSID_LIST[] pDesiredBssidList; The history of this shows that IntPtrs for pDot11Ssid and pDesiredBssidList were changed to DOT11_SSID[] and DOT11_LIST[]. Then it should have some kind of explanation about the reason. I think whether to use IntPtr or DOT11_SSID[] etc should be determined by which one you want, "Marshal" or "UnMarshal". Also, DOT11_SSID[] looks to be wrong. It is to point one "SSID" not a series of SSID. Also, it would be great if it explains how to marshal ucSSID in DOT11, because the ucSSID is just ANSI string ( without the terminating '\0'. )
public DOT11_SSID hostedNetworkSSID; Cut off search results after 60. Please refine your search. |