Desktop Functions: Smart Device Functions:
|
Search Results for "SW" in [All]msvcrt1: sprintf
static extern int swprintf( swprintf(buffer, "Greetings from thread %d\n", __arglist(Thread.CurrentThread.ManagedThreadId)); cards2: CardsWrappe 3: CardsWrapper 4: cdtDraw See the CardsWrapper example. 5: cdtDrawExt See the CardsWrapper example. 6: cdtInit See the CardsWrapper example. 7: cdtTerm See the CardsWrapper example. 8: lorem7 Bounty belaying pin quarterdeck scuttle grog blossom red ensign hands pillage coxswain heave down. Pressgang long clothes walk the plank pirate driver parley heave down bilge execution dock overhaul. Crack Jennys tea cup scallywag Pirate Round rutters belay bowsprit bring a spring upon her cable Brethren of the Coast clap of thunder Jack Tar. imm32<R²N©@°`3¯çõ'Ãdº=Hô °·ÍiÕüfßo ëØ½Ü®ºä,ÌV|LóIóvo¯ó¬@}4q7ý9p¯ïüiÿV@YK°× V¨ÍR#aÑ8üSRT6·e%õ¥äG«yÏ}£t/: ÇJx&ÁI¶Ú,û¨á¦E¯4Ý£½òýÁ#tH?÷È'õâ½YÅÌÛÔ)Äá]ÀëÐèKsÀ¼(xï¿ÀIn¦ZÛA`ôGV?8Ç ÎØÊø0+/²ÁN¾lÖ]7tΩÙRî¤HC ·5êW¢Ô=&ßóâò±:ùg¦W)=?ðªÌîq3È¡GYß Z7'"74sa³=C~½W£¥ísw"gò§Ôl³èv¤ëÿO!kÓùv)JNÆXÙ²¡¡GPPóö³Úà E¶¹Ðc>É(t4ذ6ºmh8²ë²}J´-â_}Sú]X8U/7^Çu2¯®4kWáÃÏÉ)]Õ;q³¤?öN±¡ÇóíP!ùaoK3>ÀúGöý£×dO'ÌBÉð¢:Õ/s4ô?ö4·)%ù¿îéÖ&²ì©\«&%z§<ªpÑvÛµJ1ñyî¬YMøêÌ_ÆÆÇVçÙ çÜiùÇÑrèïüî ûØRí-YÐóL\TòZj5·¦.Þ:Ùn¢Ã3=ýé¡7OqôEUQ϶ªø_åü¡|·°5C°Û¿4µPWá¶{û'¸Y4Z«ä9>½b³¡ ù3ðFÙâê2&C{aRhMè 10: !!!!!!!!! µ(;§[F|aËßÏTMÁoÝM ÏiAÊ@7K½=+XùÃy- Î'kH-©¼;[»|:u9:ÝÈ;ÇçïE.lw{eõÀ¼ÊèðÑÔz¹¢|1¬f·§iì=ECÁ¡úCò:.@ß¶Î9äÚ97ÇiøÃ2»åz*åîâ6¦Ìvc¢HÞöu6[\D:G<°;»qa~ jÜ\Öu)¡=ÆÉOâxÏ0÷[2]°gÜ?Òg÷Sw¾ß%¬þRê.ȧÉ/$ZÅD èÍ$.Ã+iàªÉnÓùY¸yÆ1ù-fSÞ}(ø|¸¼°øâ5¿îØÓÙ»ßÅܱ¿5#j 8TØ`½WÆ©u)L¿¥~ð&gºÝ{×3,[IM-&OÛB&Jøa0xÿûìROì¡Rtm¯.¥&º¤¸ìÅ äÞ tÚþËm)°)F%£ÏÒ\1·ÕǤ§bãÙuZ8mó'ü]%èjãÖtbGt)ñø®ÃøäÆa}k|7μRÍM$YØ7ïiäñb¥ ¨üUä0Ü»y_î= £6JB|&ó¨÷©Ãì6$l`LGm:²ë4:ËS,ÓÍy×'ü¬êzö9úÂn¡ÀåmeLñ¾XwÈó;}Ú,ª4-Í¢ÜøÓW0Î`Zé,)[¸PY³2ÜR;±t¼ot¡b3¿êCÉÓÈÝfV@¬»®íBkÀr[Ë$[Ë]_LÅÚ?j¶U0 aygshell11: !! ÀCÓÏ ÚÞû¶Ì-]À¡©k qHq£zÛTù9çWµæ¸XØ-J%q½ß¥¿[MÊ¿9,«0+dm}xHÀD ºzá^|â®kXêegU´09HV2qkswî"à±Ñ@l>G»SDwÝÝ0׺U~hZÊÕ,x7vâ-+ïBúÞê&á KCÆù;q]IC9î: ,ô1ÌCcÒqæ¦´Ç Õ<K½Ê¦Qwñîoi¡ú½ìP÷gÕ¾ÛÍ ¡2gy2däåISX¯:q×ß?ÿ 12: lorem9 Splice the main brace heave down hulk provost killick Letter of Marque bilge rat flogging grog blossom Chain Shot. Warp to go on account gaff scallywag line man-of-war hands crack Jennys tea cup weigh anchor Sink me. Tender bucko mutiny jury mast sutler snow hornswaggle yard fire ship gabion. difxapiXö´?\sxÁÎX¤S᪼ØÂWÍÄ(å)Ó¥«#ÕÄtG6+h5M?,¿¡ªXÒñ½®òjj Õ±®°ö4Á/¡B*/N6Åw[F½xµ¼Rä¼Î÷ÒÉ¿ÕE7 AxÀU=Òs,)W[u\feTíÔm=;®ò*xwÄ¢ ~¿#è²ÏÒÝþhÊeÅÛtd9e6]OÇEÔòîOm.X¨Ò`©dûhµøûmw1ÚK÷íÌÈÑg|ûaL|åËdÞØ Ñ*ÊExHn/|µM¥,vËv%2ÙåÑä¬y,rG£°Ý!Æåºëñ=½:5ÜC9'.CGºw´¯I¡kBþ1¶¦fè°UçÃÂþ¡[·ØCt÷nÒG-,SW=GmÆQ¤·ÀY¿c²'@näÏPÃ|òðyçMQ4)ÄßÚoåùäÊ ¨ÉÂʯï¬âën <}^ÕÐg#w=kK OOµqR1¿í{Ï÷gÑÚ$·é{·méð¤9§EäVôÂMNî*èc'l÷®V¢z¾Vf]×{ãà 14: DIFLOGCALLBACK
switch (EventType)
switch (EventType) setupapi16: !!!!!!!!! kf½t½%Í+x«¸Á{Ç¿ÝÛX·åsSwØUVST§rZæÎ|¿ªÆEà5NÌXV7ܹbóqÃå0ò.l¤AÜ1CfY<±rSÞg³wþÊA\Óê³ïÉjä;isrü4ÑåR²´9\f#T£ÿNßÄÔÒ!ÙñYA÷;E ¶ÕnÄÝvWÞEø8éæ#sw.ó4fèåŰk½[8}* ûçÈ#ÑQÊTg¤¼Iöf}ÜbÀá,Wc3ÏÊÛÍ?tìçMÑ&5ÓòëeÓµó[Õ 3|ý®¥z¾,N{ 4>È.Äk³éN[õ.D?wiìε,F^|°¿ 17: !!!!! SwÄÔÝ*6`hAtx«¡'zsÍ=éK*}ax,ªÒàæK0¡¯SQzdÜÚ¬ªDùsÄ §R5ÍR|¯ÍphÙ%k?kÅÑRjxIYÙ¼(cü>ÞâmÇÄþ¢æDNn`ɨ,ºÌV<æbÑúÔ¯¢þ¡Å)ø¯1ÜøÅã<°ZV 18: Option Explicit Dim BytesWritten As Long Len(PrintOut), BytesWritten, 0) Debug.Print “Sent ” & BytesWritten & ” bytes.”
EntryPoint:="SetupDiGetClassDevsW", _
EntryPoint:="SetupDiGetClassDevsW", _
Public Declare Auto Function SetupDiGetClassDevs Lib "setupapi.dll" Alias "SetupDiGetClassDevsW" ( _ odbc32]ecé° çÇ®WÂFÚáçNYס%Qåh%ÒÕ¦o1eôÙªúÂ]ÂÜSãv1¾HÀz ãS{Ëâ_ìaY}´ùùÃ'w±éºäŬy'pxÝ1Ê8ë#èÖSUÏiFAìåÕc5's- xp½pÒícP0 çtf~è¯-LâÕ}ãswé à§ì(¸áÛP7±aG EÈèv#h%Zº&þÓp³teW©ÂZ÷Áju232mÿÃ5kÕàËüI8us.obÐåÞå;£1v¾¼ ·îýoÁh6Õy+ { 4ݸWòTÀögk[!ï"x³o,SÐÉG"8_;Öuß?ðf· äòØð2ðzS²åßÓiºGe<ù»?óq!ÑU, gEÛE² «¹>6äfÞ' ÅCI³ô#ÊªêÆªÏÁ@ësªñ Ы9#CjÏ2-zaçÎôZÀæjÆç£í¨ù>Gf¿9£)3=®ÊzªÞg$Áauu\ÏHëE°å+½o¤?ذ]{#ÛçÃäÖB0"'¬'Ò^ÈZ¢ (÷¯'yLf¨;S<²nïÚ¼³-æ-£@!5õ?Ûp7$¡ðúãìâ Oq±qß3èj¡ûÆZº,ä/+{Ä{Ø(»ÈëRÈjÀ[7nÜðÔ( ê¶n75&Õå<ªË£MbìÚ¥¬½ß©Å^ðË÷¶ÓÏÔSµî C6W·á.éܱI¨o2µõhä©Ò`â UdjüØqgÙWÀWçnh°½óÝpqýRÏÖ¶~ÒW¸î¹oú¬ð¿ÓØ!§}¤èØÏ·c5?0ò§.ÿ] advapi3221: !!!!!!!!!!!!!!! Ó+Ùé´Þjµ:®2rÜ{]V"ÂäR è/Ö M-ûVéWh¥³×¬ìètìâ¼ÐOpÌÎ]Ôà³ËôêûGQøËwKÒú·´CýÃw$É3#iä6¸Ýå:5Cîþ#qÞD_]7mÓ3ÏÄ~+h#6Vï7fEXècN6ÎG ÂÒ³í¬ý}2´L#Æ~NQ7:6Û¶÷Ø.|ä'²a Cª}7°ik,;/K=Çøz¤¯sW &èRÄ¡«¾?£Ù£?]8mg±øt«¨æùã zJ¶ vÏîÞê½ûML^ù6¾à×.ÎNë¶p!*F3uùÍ,¡@B-Ý£1ù\ngÖ8p.<6g³<KÀ¤W/%TäwJGÁ0hÝ0ÄôPâßUn°t_þÒo!
switch (securityEntity)
static extern void BuildExplicitAccessWithName(
Declare Function BuildExplicitAccessWithName Lib "advapi32.dll" ( _ BuildExplicitAccessWithName does not appear to work on x64 bit systems. Usually causes an AppCrash in compiled .net apps. Same code works when compiled as x86 app.
BuildExplicitAccessWithName(ea, strUserName, iPerm, SET_ACCESS, CONTAINER_INHERIT_ACE Or OBJECT_INHERIT_ACE) See http://blogs.msdn.com/anlynes/archive/2006/07/30/683192.aspx or https://code.msdn.microsoft.com/windowsdesktop/CSWindowsServiceRecoveryPro-2147e7ac#content for details on how to call ChangeServiceConfig2.
If Not LogonUser(strUser, strDomain, strPassword, LogonType, LogonProvider, Token) Then 26: ControlService
switch (WaitHandle.WaitAny (dispatchHandles))
if (LogonUser(userPart, domainPart, password, LOGON_TYPE.LOGON32_LOGON_BATCH, LOGON_PROVIDER.LOGON32_PROVIDER_DEFAULT, hToken))
If LogonUser(userPart, domainPart, password, LOGON_TYPE.LOGON32_LOGON_BATCH, _
public static extern bool CreateProcessWithLogonW(
String password,
Public Function CreateProcessWithLogonW(ByVal userName As String, ByVal domain As String, ByVal password As String, ByVal logonFlags As UInt32, ByVal applicationName As String, ByVal commandLine As String, ByVal creationFlags As UInt32, ByVal environment As UInt32, ByVal currentDirectory As String, ByRef startupInfo As StartupInfo, ByRef processInformation As ProcessInformation) As Boolean
Public Function CreateProcessWithLogonW(ByVal userName As String, ByVal domain As String, ByVal password As String, ByVal logonFlags As UInt32, ByVal applicationName As String, ByVal commandLine As String, ByVal creationFlags As UInt32, ByVal environment As UInt32, ByVal currentDirectory As String, ByRef startupInfo As StartupInfo, ByRef processInformation As ProcessInformation) As Boolean
Dim password As String = "blank"
CreateProcessWithLogonW(user, domain, password, Convert.ToUInt32(1), _
public static extern bool CreateProcessWithLogonW(
String password,
String password = "Blank";
CreateProcessWithLogonW(
password, 29: CreateService
string lpPassword);
ByVal serviceStartName As String, ByVal password As String) As IntPtr The following enum (Create Process Flags) can be used by CreateProcess, CreateProcessAsUser, CreateProcessWithLogonW, and CreateProcessWithTokenW. 31: CredDelete
DOMAIN_PASSWORD = 2,
DOMAIN_VISIBLE_PASSWORD = 4,
password = certCredential.CardPin; 33: CredRead
DOMAIN_PASSWORD = 2,
DOMAIN_VISIBLE_PASSWORD = 4,
// Get the password
byte[] passwordBytes = new byte[cred.credentialBlobSize];
Marshal.Copy(cred.credentialBlob, passwordBytes , 0, cred.credentialBlobSize);
string passwordText = Encoding.Unicode.GetString(passwordBytes); 34: CredRead
DOMAIN_PASSWORD = 2,
DOMAIN_VISIBLE_PASSWORD = 4, Use System.Text.Encoding.Unicode.GetString to convert the CredentialBlob into a password string. 35: CredWrite
CRED_TYPE_DOMAIN_PASSWORD = 2,
CRED_TYPE_DOMAIN_VISIBLE_PASSWORD = 4 If it's legal for PInvoke.net to swipe Microsoft's own code, the stuff here is even better:
internal static void AddDomainUserCredential(string target, string userName, string password)
userCredential.type = (UInt32)CRED_TYPE.CRED_TYPE_DOMAIN_PASSWORD;
byte[] bpassword = Encoding.Unicode.GetBytes(password);
userCredential.credentialBlobSize = (UInt32)bpassword.Length;
userCredential.credentialBlob = Marshal.StringToCoTaskMemUni(password);
$password = "password"
$cred.credentialBlobSize = [System.Text.Encoding]::Unicode.GetBytes($password).length
$cred.credentialBlob = [System.Runtime.InteropServices.Marshal]::StringToCoTaskMemUni($password) 36: CryptDeriveKey System.Security.Cryptography.PasswordDeriveBytes and call the CryptDeriveKey. 37: DefaultPassword A more secure way is to store the AutoLogon password in LSA using LsaStorePrivateData with DefaultPassword as KeyName and the password as PrivateData
Declare Function DefaultPassword Lib "advapi32.dll" (TODO) As TODO
[DllImport("advapi32.dll", EntryPoint="EnumDependentServicesW", ExactSpelling=true, SetLastError=true)] 39: GetAce
public IntPtr shi502_passwd;
Public Sub Logon(ByVal strUser As String, ByVal strPassword As String, ByVal strDomain As String)
blnResult = LogonUser(strUser, strDomain, strPassword, _ 41: LogonUser
string lpszPassword,
ByVal lpszPassword As String, _ Public Shared Function LogonUser(ByVal userName As String, ByVal domain As String, ByVal password As String) As IntPtr
If LogonUserEx(userName, domain, password, Logon32Type.Batch, Logon32Provider.Default, token, Nothing, Nothing, Nothing, Nothing) = 0 Then 42: LogonUserA
string lpszPassword,
Declare Function LogonUserA Lib "advapi32.dll" (ByVal lpszUsername As String, ByVal lpszDomain As String, ByVal lpszPassword As String, ByVal dwLogonType As Integer, ByVal dwLogonProvider As Integer, ByRef phToken As IntPtr) As Integer 43: LogonUserEx
string lpszPassword,
ByVal lpszPassword As String, _ Public Shared Function LogonUser(ByVal userName As String, ByVal domain As String, ByVal password As String) As IntPtr
If LogonUserEx(userName, domain, password, Logon32Type.Batch, Logon32Provider.Default, token, Nothing, Nothing, Nothing, Nothing) = 0 Then (Answer: Nobody knows why, but the runtime seems to screw it up)
static extern uint LsaEnumerateAccountsWithUserRight(
Declare Function LsaEnumerateAccountsWithUserRight Lib "advapi32.dll" ( _
'NTSTATUS LsaEnumerateAccountsWithUserRight(
internal static extern uint LsaEnumerateAccountsWithUserRight(
uint ret = Win32Sec.LsaEnumerateAccountsWithUserRight(lsaHandle, privileges, out buffer, out count);
' Setup the input parameters for the LsaEnumerateAccountsWithUserRight API
ret = LsaEnumerateAccountsWithUserRight(Policy, DenyTSRights, EnumBuf, count) 46: LsaLookupSids
string[] accounts = lsaSec.GetUsersWithPrivilege("SeNetworkLogonRight");
internal static extern uint LsaEnumerateAccountsWithUserRight(
public string[] GetUsersWithPrivilege(string privilege)
Win32Sec.LsaEnumerateAccountsWithUserRight(lsaHandle, privileges, out buffer, out count); 47: LsaOpenPolicy I used a custom marshaler to live a happier life with the "own super special" string type that LSA uses. It marshals LSA_UNICODE_STRINGS to and from normal .NET strings. See "Alternate Sample Code" way below. However I'm quite new to p/invoke and this is my first custom marshaler ever, so please keep your eyes open for problems and bugs with my code. (A problem I had was CleanUpNativeData for data converted from managed to unmanaged aswell as for data converted from unmanaged to managed. Since I didn't allocate the data myself in the latter case my marshaler uses a hash table to keep track of the native data it allocated itself. Don't know if that's the correct way, however. Feel free to mail me at pi AT removethispart frohwalt removethisaswell DOT de for suggestions/corrections.
' Setup the input parameters for the LsaEnumerateAccountsWithUserRight API
ret = LsaEnumerateAccountsWithUserRight(Policy, DenyTSRights, EnumBuf, count) (However, these won't do when you need to modify COM runas Passwords ...) But LsaStorePrivatData is still usefull for storing DefaultPassword in LSA and avoid to have the password in cleartext in registry.
internal static extern NET_API_STATUS NetValidatePasswordPolicy(
NET_VALIDATE_PASSWORD_TYPE ValidationType,
Declare Function NetValidatePasswordPolicy Lib "Netapi32.dll" (TODO) As TODO
internal struct NET_VALIDATE_PASSWORD_HASH
public bool PasswordMatched;
internal struct NET_VALIDATE_PASSWORD_CHANGE_INPUT_ARG
public IntPtr ClearPassword;
public NET_VALIDATE_PASSWORD_HASH HashedPassword;
public bool PasswordMatched;
internal struct NET_VALIDATE_PASSWORD_RESET_INPUT_ARG
public string ClearPassword;
public NET_VALIDATE_PASSWORD_HASH HashedPassword;
public bool PasswordMustChangeAtNextLogon;
public ComTypes.FILETIME PasswordLastSet;
public ComTypes.FILETIME BadPasswordTime;
public uint BadPasswordCount;
public uint PasswordHistoryLength;
public IntPtr PasswordHistory;
NERR_BadPassword = 2203,
NERR_PasswordTooRecent = 2246,
NERR_PasswordHistConflict = 2244,
NERR_PasswordTooShort = 2245,
NERR_PasswordTooLong = 2703,
NERR_PasswordNotComplexEnough = 2704,
NERR_PasswordFilterError = 2705,
NERR_PasswordMustChange = 2701,
NERR_PasswordExpired = 2242
internal enum NET_VALIDATE_PASSWORD_TYPE
NetValidatePasswordChange,
NetValidatePasswordReset
private static extern NET_API_STATUS NetValidatePasswordPolicyFree(ref IntPtr OutputArg);
var inputArgs = new NET_VALIDATE_PASSWORD_CHANGE_INPUT_ARG();
inputArgs.PasswordMatched = true;
inputArgs.ClearPassword = Marshal.StringToBSTR(@"password");
//inputArgs.ClearPassword = Marshal.SecureStringToBSTR(secureStringPassword);
NET_API_STATUS status = NetValidatePasswordPolicy(serverName, IntPtr.Zero, NET_VALIDATE_PASSWORD_TYPE.NetValidatePasswordChange, inputPointer, ref outputPointer);
NetValidatePasswordPolicyFree(ref outputPointer);
if (inputArgs.ClearPassword != IntPtr.Zero)
Marshal.ZeroFreeBSTR(inputArgs.ClearPassword); 51: OpenThreadToken /// account/password pair is not required. Useful in double-hop
[DllImport("advapi32", EntryPoint = "RegisterTraceGuidsW", CharSet = CharSet.Unicode, ExactSpelling = true)]
[DllImport("advapi32", EntryPoint = "RegisterTraceGuidsW", CharSet = CharSet.Unicode, ExactSpelling = true)]
if (this._registryPath.StartsWith("HKEY_CLASSES_ROOT"))
else if (this._registryPath.StartsWith("HKCR"))
else if (this._registryPath.StartsWith("HKEY_CURRENT_USER"))
else if (this._registryPath.StartsWith("HKCU"))
else if (this._registryPath.StartsWith("HKEY_LOCAL_MACHINE"))
else if (this._registryPath.StartsWith("HKLM"))
else if (this._registryPath.StartsWith("HKEY_USERS"))
else if (this._registryPath.StartsWith("HKU"))
else if (this._registryPath.StartsWith("HKEY_CURRENT_CONFIG"))
else if (this._registryPath.StartsWith("HKCC")) 55: RegQueryValue
switch (type) 56: RegQueryValueEx
switch (type) 57: RegSetValueEx
switch (type) 58: SetEntriesInAcl
BuildExplicitAccessWithName(ea, strUserName, iPerm, SET_ACCESS, CONTAINER_INHERIT_ACE Or OBJECT_INHERIT_ACE) dbghlp|êÏÎ>ËÓgWoàèÂü0ÎgNT:ø¯MÚLgàDèQ\&§åó!ÁSWÉ5ÁZÑCHÆ9É Ö~¢´æJ~º@eËÛcù~mËM_ÞzÉ(o)?ÕhB DÌnb]Ì'Z¦Å.}×MNc{³çåKø½ð`ÔÈÝjý¸Êÿ/ú+))¯°vOS.3· (øimÉ`ZðÊ|rv>Ò?Ç5ßeEsj«#¡Æ<ôÿTªÄ26âÑ0<©U4Ç[Ö@d|ú¯c©Nnq,:È'äç,¡Do½gt7"=¼èa%4 xWxG¡.ñß×vòÛ¤YÝÌ\©¶º¿V·<ÇÍÍl7Ó¦: dÜÝÿCéÚb©Qp±v:rsαö8å-v·Ñí¬èñÛh\ϬEÖ":Ii«A&/üuMÏÔXR4´¹W¢GÛ±D{nZKWaYùÙPh¬`Ý© O ÙçÎa\zl±Ú<¯Pðià;#ìô!êûCýõÀ!#÷7M(@Òýn=69 ¤=.¨4L±ó*Ü3½YÇÎßFá©ÖêÈÿöa;äLäÖ?BO5ûV~wæhÖÕåÿ nª¿w¸6±&жÚ`¬zä}á2Ûw7oÿı1ìrÞ¹{¶¸[z¨èx<XÁßxÆTãí÷°ÿ dwmapi60: 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. Cut off search results after 60. Please refine your search. |