Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Download Visual Studio Add-In

Search Results for "SW" in [All]

Constants

.

    switch (Msg) {

.

const readonly int CRED_TYPE_DOMAIN_PASSWORD = 2;

.

const readonly int CRED_TYPE_DOMAIN_VISIBLE_PASSWORD = 4;

.

   DOMAIN_PASSWORD

.

   DOMAIN_VISIBLE_PASSWORD

3: IDC_
.

            IDC_SIZENESW = 32643,

.

        IDC_SIZENESW = 32643,

.

        IDC_SIZENESW = 32643

4: MAPI
.

  /// If the user needs to provide a password and profile name to enable a successful logon,

.

  /// MAPILogon should only prompt for a password and not allow the user to change the profile name.

.

  /// Either MAPI_PASSWORD_UI or MAPI_LOGON_UI should not be set, since the intent is

.

  public const uint MAPI_PASSWORD_UI = 0x00020000;

.

    Public Const MAPI_PASSWORD_UUI As UInteger = &H20000

.

        /// <summary> 2203 - The password parameter is invalid. </summary>

.

        public const int BadPassword = 2203;

.

        /// <summary> 2242 - The password of this user has expired. </summary>

.

        public const int PasswordExpired = 2242;

.

        /// <summary> 2243 - The password of this user cannot change. </summary>

.

        public const int PasswordCantChange = 2243;

.

        /// <summary> 2244 - This password cannot be used now. </summary>

.

        public const int PasswordHistConflict = 2244;

.

        /// <summary> 2245 - The password does not meet the password policy requirements. Check the minimum password length, password complexity and password history requirements. </summary>

.

        public const int PasswordTooShort = 2245;

.

        /// <summary> 2246 - The password of this user is too recent to change. </summary>

.

        public const int PasswordTooRecent = 2246;

.

        /// <summary> 2403 - This share name or password is invalid. </summary>

.

        public const int BadPasswordCore = 2403;

.

        /// <summary> 2458 - A password mismatch has been detected. </summary>

.

        public const int PasswordMismatch = 2458;

.

        /// <summary> 2701 - The password must change at the next logon. </summary>

.

        public const int PasswordMustChange = 2701;

.

        /// <summary> 2703 - The password is too long. </summary>

.

        public const int PasswordTooLong = 2703;

.

        /// <summary> 2704 - The password does not meet the complexity policy. </summary>

.

        public const int PasswordNotComplexEnough = 2704;

.

        /// <summary> 2705 - The password does not meet the requirements of the password filter DLLs. </summary>

.

        public const int PasswordFilterError = 2705;

.

    public static PropertyKey PKEY_Pairing_IsWifiOnlyDevice = new PropertyKey(0x8807cae6, 0x7db6, 0x4f10, 0x8e, 0xe4, 0x43, 0x5e, 0xaa, 0x13, 0x92, 0xbc, 0x0000010);    // VT_BOOL

.

    public static PropertyKey PKEY_WCN_DevicePasswordId = new PropertyKey(0x88190b89, 0x4684, 0x11da, 0xa2, 0x6a, 0x00, 0x02, 0xb3, 0x98, 0x8e, 0x81, 0x0000000c); // VT_INT

.

    public static PropertyKey SENSOR_DATA_TYPE_BOOLEAN_SWITCH_STATE = new PropertyKey(0X38564A7C, 0XF2F2, 0X49BB, 0X9B, 0X2B, 0XBA, 0X60, 0XF6, 0X6A, 0X58, 0XDF, 2); //[VT_BOOL]

.

    public static PropertyKey SENSOR_DATA_TYPE_MULTIVALUE_SWITCH_STATE = new PropertyKey(0X38564A7C, 0XF2F2, 0X49BB, 0X9B, 0X2B, 0XBA, 0X60, 0XF6, 0X6A, 0X58, 0XDF, 3); //[VT_R8]

.

See BuildExplicitAccessWithName

8: SW
.

const UInt32 SWP_NOSIZE      =0x0001;

.

const UInt32 SWP_NOMOVE      =0x0002;

.

const UInt32 SWP_NOZORDER    =0x0004;

.

const UInt32 SWP_NOREDRAW    =0x0008;

.

const UInt32 SWP_NOACTIVATE      =0x0010;

.

const UInt32 SWP_FRAMECHANGED    =0x0020;

.

const UInt32 SWP_SHOWWINDOW      =0x0040;

.

const UInt32 SWP_HIDEWINDOW      =0x0080;

.

const UInt32 SWP_NOCOPYBITS      =0x0100;

.

const UInt32 SWP_NOOWNERZORDER   =0x0200;

.

const UInt32 SWP_NOSENDCHANGING  =0x0400;

.

const UInt32 SWP_DRAWFRAME       =SWP_FRAMECHANGED;

.

const UInt32 SWP_NOREPOSITION    =SWP_NOOWNERZORDER;

.

const UInt32 SWP_DEFERERASE      =0x2000;

.

const UInt32 SWP_ASYNCWINDOWPOS  =0x4000;

.

    Const SWP_NOSIZE As Integer = &H1

.

    Const SWP_NOMOVE As Integer = &H2

.

    Const SWP_NOZORDER As Integer = &H4

.

    Const SWP_NOREDRAW As Integer = &H8

.

    Const SWP_NOACTIVATE As Integer = &H10

.

    Const SWP_FRAMECHANGED As Integer = &H20

.

    Const SWP_SHOWWINDOW As Integer = &H40

.

    Const SWP_HIDEWINDOW As Integer = &H80

.

    Const SWP_NOCOPYBITS As Integer = &H100

.

    Const SWP_NOOWNERZORDER As Integer = &H200

.

    Const SWP_NOSENDCHANGING As Integer = &H400

.

    Const SWP_DRAWFRAME As Integer = SWP_FRAMECHANGED

.

    Const SWP_NOREPOSITION As Integer = SWP_NOOWNERZORDER

.

    Const SWP_DEFERERASE As Integer = &H2000

.

    Const SWP_ASYNCWINDOWPOS As Integer = &H4000

9: SWP
.

const UInt32 SWP_NOSIZE      =0x0001;

.

const UInt32 SWP_NOMOVE      =0x0002;

.

const UInt32 SWP_NOZORDER    =0x0004;

.

const UInt32 SWP_NOREDRAW    =0x0008;

.

const UInt32 SWP_NOACTIVATE      =0x0010;

.

const UInt32 SWP_FRAMECHANGED    =0x0020;

.

const UInt32 SWP_SHOWWINDOW      =0x0040;

.

const UInt32 SWP_HIDEWINDOW      =0x0080;

.

const UInt32 SWP_NOCOPYBITS      =0x0100;

.

const UInt32 SWP_NOOWNERZORDER   =0x0200;

.

const UInt32 SWP_NOSENDCHANGING  =0x0400;

.

const UInt32 SWP_DRAWFRAME       =SWP_FRAMECHANGED;

.

const UInt32 SWP_NOREPOSITION    =SWP_NOOWNERZORDER;

.

const UInt32 SWP_DEFERERASE      =0x2000;

.

const UInt32 SWP_ASYNCWINDOWPOS  =0x4000;

.

        /// The specified network password is not correct.

.

        public const int ERROR_INVALID_PASSWORD = 86;

.

        /// The verify-on-write switch parameter value is not correct.

.

        public const int ERROR_INVALID_VERIFY_SWITCH = 118;

.

        public const int ERROR_SWAPERROR = 999;

.

        /// The account name is invalid or does not exist, or the password is invalid for the account name specified.

.

        /// The format of the specified password is invalid.

.

        /// The password is too complex to be converted to a LAN Manager password. The LAN Manager password returned is a NULL string.

.

        /// Unable to update the password. The value provided as the current password is incorrect.

.

        public const int ERROR_WRONG_PASSWORD = 1323;

.

        /// Unable to update the password. The value provided for the new password contains values that are not allowed in passwords.

.

        public const int ERROR_ILL_FORMED_PASSWORD = 1324;

.

        /// Unable to update the password. The value provided for the new password does not meet the length, complexity, or history requirement of the domain.

.

        public const int ERROR_PASSWORD_RESTRICTION = 1325;

.

        /// Logon failure: unknown user name or bad password.

.

        /// Logon failure: user account restriction.  Possible reasons are blank passwords not allowed, logon hour restrictions, or a policy restriction has been enforced.

.

        /// Logon failure: the specified account password has expired.

.

        /// A cross-encrypted password is necessary to change a user password.

.

        /// A cross-encrypted password is necessary to change this user password.

.

        /// Mutual Authentication failed. The server's password is out of date at the domain controller.

.

        /// The user's password must be changed before logging on the first time.

.

        /// The network connection was made successfully, but the user had to be prompted for a password other than the one originally specified.

.

        /// Security Account Manager needs to get the boot password.

.

        /// Manifest Parse Error : Switch from current encoding to specified encoding not supported.

.

        public const int ERROR_SXS_XML_E_INVALIDSWITCH = 14068;

.

        /// The server process could not be started because the configured identity is incorrect.  Check the username and password.

.

        public const int STG_E_DISKISWRITEPROTECTED = (int)(0x80030013 - 0x100000000);

.

        /// The identity or password set on the application is not valid

.

        public const int COMADMIN_E_USERPASSWDNOTVALID = (int)(0x80110414 - 0x100000000);

11: WM
.
WM_NEXTMENU 0x213 The WM_NEXTMENU message is sent to an application when the right or left arrow key is used to switch between the menu bar and the system menu.

Delegates

.

ˆLžš•’‹ÿ´ÐvL[¶E|IàŠ‘iÐÃ6ºþ ’.ÚK­1y¤Líê©È.ˊUiçÐ3nŒLö‹ŒšpmY¹@îh^ï7ªOI5ÈEhêì“!–àþï}SWE7¡*Ó9ú¾@h@n >qô|<nµ|_SÝ¢Þ\gÅÁ„.A5—eì£ëWt˜q‚˜¸÷³ºA¸‹žîß0¥žcÂbÑÿ{R5lg‚76kš´

13: 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.

mqrt

.

Vœ˜swÞe¿b„B (±2õšktޞ¥õ>ż“ê˜b?—3jæ¦q:?ͺhyP6‚„ÆÚسƒ÷8

.

0#/xq ÐTO¬`· :zâøq¹µ8ÞIùuM±ØgÁ|ÄױδOdjÞ³ø°ÏK¡fqͅ1fsW<ȦççhåO#f$²¬‘£‘ä}›è|ïþÖöö”Pfi£í4Ø `º^œ²¬N§üRù÷Qût?bŸJ8YS3ÙK~N”«LR™FæBÍ ¤- sﻛ–U…o(5~ÚRbçQU 7 »j&ÆÛ_fBÝÃ@ü}ù”E²p"“blõoñž©çg\j¯ƒ)t[{y›  lªd,z#Ãè^÷¯ü>(7

dbghlp32

16: !!!!
.

8lêH'Ÿ™–ýÕZdó-;ßÏò÷)’8Þ2ÁÆL£ƒ»Ò{§=àN»çé2ö¯—¢™Ysw1ª?QÑÕ"ÃÎlOt©hÞ®ùPÊÄ:A×Rgʕ:Ž.¾å_¡wIëQ&ÑÿÀ·i÷ÑÒ u9ØÅG¾D؄`° 5§œ)YʧME¥”Ãø6Ì»Áˆ¢˜¦½CÝð¾ÁHÛxO¢Œà4‘g"??g¾w€&àš@A"MhVÓU’  úœÄ$µñPÂ3ãRp²Gã;hä€Éœ®€Ä&

gdiplus

.

   int height, float startAngle, float sweepAngle);

.

   int width, int height, float startAngle, float sweepAngle);

wer

19: 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.

odbccp32

.

private static extern bool SQLGetInstalledDriversW(char[] lpszBuf, ushort cbufMax, out ushort pcbBufOut);

.

private static extern bool SQLGetInstalledDriversW(char[] lpszBuf, ushort cbufMax, out ushort pcbBufOut);

.

     bool succeeded = SQLGetInstalledDriversW(driverNamesBuffer, ushort.MaxValue, out size);

.
Documentation
[SQLGetInstalledDriversW] on MSDN
.

private static extern bool SQLGetInstalledDriversW(char[] lpszBuf, ushort cbufMax, out ushort pcbBufOut);

.

private static extern bool SQLGetInstalledDriversW(char[] lpszBuf, ushort cbufMax, out ushort pcbBufOut);

.

     bool succeeded = SQLGetInstalledDriversW(driverNamesBuffer, ushort.MaxValue, out size);

.
Documentation
[SQLGetInstalledDriversW] on MSDN

dbghelp

.

»¦bšœJgÔu®9|."μҟäꌮ9p¹BóÙlåvk)•TŠ$f§}Ö ¡Ò-’s$"|;gl[ڛ/çbkjׂ‹¤ˆɟ\c<X3µøÎ•Vd\}R2jO3–íµï· ó |L¦cñY{w¯eYÄ<hÃA6Ô l!õÖ‰ýžéJGљâŽZv÷õ"G^‘ØƑ:³ºe\ä=Ö{ザHKAՃܹj@´h¬šž” yKkÝm FÈ-ފ› Ùý#v‚ôÛ@ÏãpFÈ4ëúFˆ`¿ì…Jig›ނy¶’{ÿ7A¥óíaŠÌ¹ÅI’š…s‰?”}JÐ>Ãǧ¨T6ü˜ÆŠbd¬@ìa)nV[>ä3ì_…£³›„Ä6Iå`ØÍf–£¥/‘¡dEC0ö9«‹¶ŒÅµ\¶sÒèÂÁFõv%ºŒž3UÍI°=Czç¥ §Ú¼™æFF„ƒÄ<—¶«ÏiVE¼IQ_ÒÀÉ=&ÅW<Êç/ayaÕSòáswf/<BO;¬R;ŠK‘Ë’™•{¦2–P ïèE/Ï©·%uV(¥AÔhØß›ÿYX¡8ùì¦FUòbXŠ8ö¦É}º ¬6ÍxµLVŠßÛ |j-Šã¡ñÆ]¢¢š›Ç‹9ÔtæP¦UµÌýJ϶Z¸ÓÍfklGI(H†ݹ"‰yнa—ÎÆ·±’Š”JZ}&F¥HÖbÝçq}ᴑw¨LN›ha•¨éfp˜£ϙÍü])©…I‡Ö®i@ޗ<Æ<jöSyë:›e‚s£èƒ®n]?ZȬ©,~ÝîÑpž .£1‚»ŠôE`ºWúÉPÙº‚¬¬'¬“ƒñ¶‰X=ãrÖH\²õò ûI"ðÊ| Î{„õuÕ¯ùÝ©.1½¯ñšUO·ëx[â`?2¿OÊ“6]P??µ®eEÓX¸l:”*²`Ä»áM̶<Ñ`ÁGhÅÛîÇÛY»ˆ‰Ç|T•™÷#’|¶L •ÕáH\BlåaeåôÜ7Ʉþ§5â Ó"¼ß ™“l¹{\¯ç„9†"òÂwùœG`ây)ûÙ3'2u{þH02ÿ'òÆÉ¿¼G\-ãDzó‘ÿ KÉï”Ñ1•nŠ=s

23: !!!!!
.

Ó§{à Œ¡¸­G“o-Åÿ3Ꜣ€½ í5ÞiTÄNQd“ÑlmJ}»š`Q9•– O<5fG`/F>´=E¿®3Ý4f¸âD×m½ß÷𱓚þʍoY”‹7U}cØØEʈÕwNÆØÜ¥‹o§ƒ2Õ¤fÆ·lè¾}rDR®J8)ºšŒŸ A¼#hv<HÃ“ €¸±ýz±O4;z"Ñ·Ÿ»P°×ÇàÀù* võ?Š™›)f¦¢Zô(§&À™dªà1öV!5z7Ò3ãK,ÿåô[î]\¿!¦ª`Û¾ÁÎól¾DªFe²Œ,‘‚%Rû6˜Î…Ë®lãÎOè¶àWbWEžïa>ÐØ6íÔV¸ÃlÁ¬hq.üæpª}Mˆ5ÏuaAkÐø¸Š5­‰ZŸ’s†¥[Dü ò˜àQ¾'þïÖ14ž.µð(\ÕHìjy†,O1%[¼mÖvŶöG‹u=œÜ›vsc“wnÓ°6†4±·óR ¤}hC Gæ®ÿó·cõ\èíÁ 8º‰ ¦zÙ(Ú¯/S)˦šÀè,j£ÅþKm(ö6ߏGSWßb‰0Œ¬§kÙñ;„çlÓm­º®<•v™k=dFϊٙZ?³O¡‚zn•dzù¹h'ñÃMP&´ú¯·¹d@õ,-$˜½²Ä‚8xDþõ"€|m†Žp¸ ü3—‘ݾiáCÞôhÁ`—Ý[ˆTÖ!; õÓk]Cñ1䛈F½›þÈ RVô™³ÈòÄ!zöMÕäû´&ðàãÆ×yc𭌑ñ+PEŠ,DþB1UOâ%ÕX¢åG;x°ðúÿV´ŠaT½l£{G8ÆOŒfR©øžÍ)‘žœyTŠéF“Mwt88ÑØ←X¸Gú,ö"¤*4¨…ÈHU¼mÖØ÷th\JПŸ¿£Ì›MŠo2pÚ.g5ލuäHn bPu³Ävsü¹—='%òTwÒý.N–` ñ{J>Ÿ îDwlˆüeÄãÁÓ619¦…ÿ% u™ÂäVÑ»ZМý²Ayy⤈¹ÃåQ¯–Ú¯¥

fbwflib

.

92ŒtJ°Þêh¤>êVŽNÈ­ÖL ŸëÜúÎ¢2ó ÷¶í3ñUôùYswûc[ž“K M

25: !!
.

"ëq_ÊÑT‘þKit†Âˆx¨9þ7ÕðåT6:çTmVhqNóïTMžsWýô×È–F”!ëáäs±w‚³öK‰ðÈ À

cards

.

See the CardsWrapper example.

.

See the CardsWrapper example.

.

See the CardsWrapper example.

.

See the CardsWrapper example.

32: 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.

winscard

.

  // Get the Answer to Rest

.

// Paste here code for SCardDisconnect, pbRecvBuffer contains Answer as Byte[]

MinCore

.

A¨ÁRKðŠ4³Pô¤·Ðvy¡P•Tì¼bB+áCC‚áËÒ´A“æ-R¾ú­A‰ÃñÉJ¥ç…pX.ô arï€}±ÈÍ"¬!°ÄõÊíQDc'lÕQ-jÜÉz·«5²£å{gµÉߙÊË1üÈË<8›<NWm¡S¢µ†ãÅ+<¾ 6sÞF#ùÌ((Eþ‚¶xZh½¥f3usW‹<… %¢élrje¯ˆf•ûnKõŸäˆ†ËÜtün㝍yD6 ¡«ÓØ8Ø]/ØË°Fª“ENŒ¨\TÈ/æ%Ogä¯^qtCA¿@¨»ê`NŠýÅ9‹Ýå'ĉ¨ù¢°˜æµÙ:ËcÈÿG)ƒ„[PLr¢:ÙÈàþ&Ô¤›ß¥a|ù3R:_š+wf3¿Þ¦!ÙëÕqÁÀþ…ûs'

ws2_32

.

äƒ mç÷—xúy«òdÅà‰×2Ü6½ÝJ¨€fwWv65ùpÀqåaՒ¢>Ë ú¾È¸’fÂ]yè«ôå¨ýNP»ìYM²ÖxûEa„£-­¦ªªoAÀ"‹'¿G¢úZBÃÚIû¨fFX±xÅ‘’‚xpaQhéS:Á-P-ƒú”ÉÇLh®JF å]RÇË­î©Ø3¡¼Öù4‹„z¡Iaõ²þ?ƒÌÅg*u' „H¦Ý¤ábœº¤œµéiÅ}œX½v&sý 4Ä2ïø!AZµE@'/„’=SÝúðGÈT:—VÓéð‡Ž¥1Už¶Šd¿6Ÿ3U)ʁÒnÇg,Ò…ÅØ>c±V_dxCCùûACßò†;A7]ÒI››ÇÈ=ÿèç½ §¥Tõ3kîû´sWR_lê%åÒS:YÒßì6`ì†LWÎ,`T”:À=øÉ½ãÌ}ªÃü³þ³`jSȕŠ‡d¹æÐª}÷Y „äí-^DmU¹ºû˜p };¨‰a’¨›T_âQb¨/À¤7jˆàU±“&Þ6q•¨n~ˆ.ðz‡.[=YÒп=¸R>ñž˜è¹ò¡% ë:éà`‡n'Â,ÆÝ߄‹j\/ް>àèÚ»îwñ•{ 

.

              EntryPoint = "WSAStringToAddressW" ) ]

advapi32

.

™Ó+Ùé´Þjµ:®2ƒrÜ{]V"ÂäR‘…‰è/օMœŽ-û‚VéWh‡¥³×¬ìètìâ¼ÐOŠpÌÎ]Ôà³ËôêûGQøËŒwKҞú·´CýÜw$ŒÉ3#iä6¸Ý† „å:5Cîþ#qÞD_]7mÓ3ÏÄ~+h#ž6Vï7fEXècN6ÎG˜ÂÒ³í¬„€ý}2’´L#Ƈ~NQ7:6Û¶”÷Ø.|Š‹ä'²aCª}7°i k,;/K=Çøz„¤¯sW &èRÄ¡«¾?£Ù£œž?]8mg±øt«¨æùŠã…zJ¶ vÏîÞê½ûML^ù6¾àב™.ÎN붘p!*F3uùÍ,¡@B-—Ý£1ù\nšg–ÖŸ8p.<6g³<K­À¤W/%TäwJGÁ0h†Ý0ċôPâßUn°t_þÒo!

.

     switch (securityEntity)

.
Summary
The BuildExplicitAccessWithName function initializes an EXPLICIT_ACCESS structure with data specified by the caller. The trustee is identified by a name string
.

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)

.
Documentation
[BuildExplicitAccessWithName] on MSDN
.

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

.

         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, _

.
Summary
Starts a new process, opens an application in that process, and uses a passed UserID and Password. The application opened is running under the credentials and authority of the UserID passed.
.

  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,

.
Documentation
[CreateProcessWithLogonW] on MSDN
.

    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.

.

      DOMAIN_PASSWORD = 2,

.

      DOMAIN_VISIBLE_PASSWORD = 4,

.

            password = certCredential.CardPin;

.

        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);

.

        DOMAIN_PASSWORD = 2,

.

        DOMAIN_VISIBLE_PASSWORD = 4,

.

Use System.Text.Encoding.Unicode.GetString to convert the CredentialBlob into a password string.

.

     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)

.

System.Security.Cryptography.PasswordDeriveBytes and call the CryptDeriveKey.

.
Summary
If you enable autologon, it is more convenient to use Windows; however this feature may pose a security risk. If you set a computer for autologon, anyone who can physically obtain access to the computer can gain access to all of the computer contents, including any network or networks it is connected to. In addition, when autologon is enabled, the password is stored in the registry in plaintext. The specific registry key that stores this value is remotely readable by the Authenticated Users group. This setting is only recommended for cases where the computer is physically secured, and steps have been taken to ensure that untrusted users cannot remotely access the registry.
.

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

.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/secauthn/security/protecting_the_automatic_logon_password.asp

.

[DllImport("advapi32.dll", EntryPoint="EnumDependentServicesW", ExactSpelling=true, SetLastError=true)]

56: 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, _

.
Summary
The LogonUserEx function attempts to log a user on to the local computer. The local computer is the computer from which LogonUserEx was called. You cannot use LogonUserEx to log on to a remote computer. You specify the user with a user name and domain, and authenticate the user with a plaintext password. If the function succeeds, you receive a handle to a token that represents the logged-on user. You can then use this token handle to impersonate the specified user or, in most cases, to create a process that runs in the context of the specified user.
.

  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

.

    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

.
Summary
The LogonUserEx function attempts to log a user on to the local computer. The local computer is the computer from which LogonUserEx was called. You cannot use LogonUserEx to log on to a remote computer. You specify the user with a user name and domain, and authenticate the user with a plaintext password. If the function succeeds, you receive a handle to a token that represents the logged-on user. You can then use this token handle to impersonate the specified user or, in most cases, to create a process that runs in the context of the specified user.
.

  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

Cut off search results after 60. Please refine your search.


 
Access PInvoke.net directly from VS: