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 "DM" in [All]

credui

.

0NHæÓñ« œ5jv4áfz0Þ j¿ÿçQ$Q=@ †<(„xb±Ð/lÉÆ:púE7Ä yÍ¿V¬[7B5AS]€n‰Þ&I. wÎÀ”]á=rÿ#Ëúò|’{L=²„fÃàìIH7Ž(×ÁèH‘ð ÃåOùA!¹üèW§zRòc(Ô¼£20bø¿ø7í½¯ÏÊõ-̾ísÕû«Êƛáí´™´ðwb oQà!Mh…†4Ÿ(è–?KGa¶‰1pöAaÝw_§È÷|1ZйÌÇ`DmÕ Ë1 (ǎQÛSf*¤u‹í¨×ëƒê«2\v0¯|Ï¿ðÌø÷Õ3_Ï}Œ¾«˜áÓSVœ",”Skô—¯ÿÚIC¸,-pQ”¨`µxü»IÇ4gãYŸµ¼I•«LˆöFŠOÐ&ÝÚâéyØøÂ¤7CVö¡‹30¹UY¢þX‘J]ü¥Ýaô¡óDÙljþ^,“ìÅ G–ä 8quí=<ìMs ™åm\œ’iŒ„i5çrXÚ¾ì

2: !
.

¦ŠˆÎ>fÔAý ,®òU>º#WW}͸é΂.•æ:Ȉ¬ËÝÂjæÝ¨Òªif‘âH:r@¨ÀÒèzƒŒò¢ÇŽpÑGØUÒ.Ee1ʱ;è{'ƒ6éƒhk«-„r]7«…?<ƒû?îäsÜm &ç/5y 7•ðšÙ°,ù·âEγ“dM7wæ}&_¾[VƤ¸Hñ1”¾ï»QÙWÁ®Ë…·Ò©TèJQç¸7§›Eñ«í©Ó[p‹ž‘

.

      /// Credential providers should enumerate only administrators. This value is intended for User Account Control (UAC) purposes only. We recommend that external callers not set this flag.

.

      CREDUIWIN_ENUMERATE_ADMINS = 0x100,

.

    CredUIWin_Enumerate_Admins = &H100

.

     credui.pszMessageText = "DisplayedMessage";

gdi32

.

Calling this API is required when working with PrivateFontCollection and AddMemoryFont, or you won't get it working.

.

privateFontCollection.AddMemoryFont(ptrFont, fontdata.Length);

.

    private static extern int SendMessage(IntPtr hWnd, WindowsMessages wMsg, IntPtr wParam, IntPtr lParam);

.

        //This version of SendMessage is a blocking call until all windows respond.

.

        long result = SendMessage(HWND_BROADCAST, WindowsMessages.WM_FONTCHANGE, IntPtr.Zero, IntPtr.Zero);

msports

.

ë\v$ï Õ0›æYJ”£A-DM$¸ÿ\x I0¶ØcÂìòӅçµJȽº8ߖ;ƒ­û3¶Y¶ÝÞ2 !¡…‘’ÿ«Ýí*qмwÜå`G‡³ÄZlpÁàâ£ÑæO>ßöpòVdøáŠ¢@?„òôRf'©PñOüRôÍz¨ËÒTúZ72r^4P@Y¯uú-®U

.

8vxj:cô®Â'm‰éG8zG¯ê ¹ô§Ð½¡ùúFØj(´[]ºùß]?Y€îeþ/c´ ‡tòÙ5O"Ù¤ñ,§¸<mÕáèH£ŽIª?ßÝ4˜ì95çJùôï:«ßZ¿†öÀ)Kþß%GØÂ'HÀW·AíK‹zÏãšÌölNڎ„÷m߉fåVÁ€ç¦â{Àº@‹“êú;ä—$«IºIã8hË PùøoÐ&€;.Ó¥lÀÈýÿèì#ù¾˜¸°ù¤Äà$s?ô#fŸ·«Ú¸GbFÂ̛v̺Æ7zö8;'mÌ8a½ïQ ò&G°JèS6?ߌÑÈ? e%‹l, …`'{ȱ’öXߊñZ?þ«Yì`lf‚Ûb³°èÐ ‚5}»/ùBDu·ìÁÑ·=ÜO€dM¸£¨â&¿äO

9: !
.

NÓïÝ|§ÕnÓWÃîK_5qˆ{¿i.,ñm²lÐ ÖâöéôiØ,ÆL³VÙxÈ+÷ý ñsL¼§Ö£›Fï𺙠èÆ(lo3¦’DJí+†ƒ´ëåX,Q㖇›I­µìÎsDòñ['ª³ÃG܊+ÄÕ! Y³"DmÁží±ZÆÚè2å뻗`d½0åi¸%ÏâžêùU Åz6PÉSoa=õcj€l¶Ú–õµòéÈ×±õô°öLÛÄAñ?«?]d%FeÜ&|ˆ¡ Y MÉ9ͤԏfûœ¬¯a|ÒèÙveÔÆ%Ãu¯&srtK±<B¶##7zs 𧔐£ðCFǙN,"µ…GMԋ3ˆ ã

winhttp

10: !!!!!
.

ô1ȟÙM0à¾Á9’Ç×b‘«(SêhYØs;<UF3Œä¬2/Î"nZÊÅÇ ½É°¹·£dÔåÓ~ŽÜ6W˜=ˆÙÏòEB_޹õèf܆HûQ;³ã¢Æ_FâïÖ²IšäJÞSζ߽pÙ­úÕ½]ÄObW}Â"ØcÛÓïs3/fZTZbܕ›q¯0Èõå~A]S&ɤ[p÷zÀÌu|' æçeôԝ7;z€%ôÅ=stî8‡¥ìž¹I9"zÏØâ5Ù)Öäµuþ*òc©È,³»¤ÛìþËŠsIåÒû~I::–Nûà&´»?OXš»äS‡Ì /†Œ×Mñ™Æ¶€n鰃êE¶Þ¾MUXfP™jáÎ×ãfdФTKSîZ3ä¥Qñ(ó¤ÆÜ0ww¥Æ¢'݋х8›ªjÚ©¿¥AÚgýȔ4B2Ù4Ñg‚‘-Jí­ÊR¶|Uê"ù¸œ.(†<œB¾Gq)Îqã5ignÝc?¤¿§ñ‘0).»¨šV…+‘鍪ËhãÛßÜdIOaópyÐcÇ€Èêr:5ÄwØþ¼Éx¡ÇÎûcm¼bŽ£»–‰ø×)C@„(ƒ«¬¨ßÒNÞÔó̸ºßšËy{Ô­ï€ÊÈÞ¾Û¦%ώ5·––‘l£…N¤£-a¥Ö-Vr`EÁ˵©väH. ö¨­U¤?@<šíq°÷¯àړN_«…Ðqù¤xëGeK/{ëä³p¼Â<=šÝ]®Àõæ¸j¥qCèÐãq¤Dm@“]‘JT`$‰ !K€fÇçEœdôÏc³†[؃=›î% Ës£Ý Ì§Î|'ºÇ^àûÁ̀¾u0ód’_6Î!7©£û3®§ÌSϏáµï°Xþ„qÞ¢S´öeôú@Æmñœhm vÞîm·}xšã([Å]°cº`i`Ž­¢ãXß)ɽ=Ê|ð} myôåË·¢]tÏðö¼s8¿ÊÌD8 ×7–• ;;*RÒ¡í kªPìÁ¤¯i&Ý

icmp

.

77ÍJ0G©Adm™Ãc¥Øûð1\UY¡!`ÝÐçêÎù›íù¢Uú‘,wì6õš[——¦ö0ìYÇ(Ї]¶$fQ$û¹–x+9½‹œ[Ü4Z]ÖrHnËwOÙÁ¬!i<žGò/Ö1Ïd°ÿhùßÙè<vë^ü ‹ç;³D¥5Ü<>?¾ÍåS/êgUÅ€š9Mt¨ yyÂ8”lD2ÿ•TüäŒê½î•iú[.S¶M³•òÒz1=¼Î¦P‚éÃyÏÇ]wðפÁ9 A¼Óq77 O4¹×¥Ð¢'”p5‚r¯ë(ü/8¤\“c?ŸÁíÆNíÇáɃN—q.ô×/µíꎸ.JŸn…¶oP£C»È2Œöüu{ºê‘ z»ëöo{‘®¸»9(Ý!Wó}{û€÷¾ ÅÀr\9ÉÏt?#FGwæP™]Ñãó É­n'U£S%¨²t•0‹7íÍgª¢µÞв‚vÁQ&_`šgœF a¼:¦œ3@k÷¦7 †ôpŒ¶Û&'?»?q

fltlib

12: !!!
.

1Éå‡:tYÊt¬"DMZ×Yq"ésðTzø=:þQ“W·5t\q2²„A¢©1V¿&$üM´cgyp–Qß¶G%Bïެ­07œ´aLR—ùÏ]|Z†F[¨¦èÐ2 #…ÆnD(2úþM–°FI“[3Æ]£,µ8¯ý€²Ÿ%Òî

Delegates

.

ñmÝlÏ‡Ž©‘¹S\.UÁ»ôWUt½¸¨PûܾIÑ`%¹ÃOˀì(-…:ó7Ž Z.ó<i¾|>ömœîa+NèáèÁf‚‹çÊõŠNüµtkÁãÍù±‰ÌËY­5Wi^ƒ3`Ï4?Q¹å†d”ÍLÚ8Îêùé¹w%Õ͹P¹7ïÜö²]A¸ù¸gxG7ðî¼×j&©Ä¾Jÿ/´-!¦›T‹¤v"«d[‹›U³GAՎ,‹ÇU…Idm煃ɘ2G5Rx6‹I±ÿs=Åê„t¶gj™þh«ü‹å>!íýØté•àɱ6É\Ý8»wKRä¾?æ×¾?Ë ²Ÿ”•Xñ?$Œ@Æô^d”ÿX{(?¢#9"³5[‡Ë(p.‡aAŒw¾¯¿i¨HZòé/€‹Àõf–u²Ù—3‰l8}±Ö7v»U@2¾ˆ–)ޏ¸Î³NÞÒïSQŽ)})Ø]+BózÏK` &@RÄ¢wÚÛ×Yí—4´,‡Z±-à?¾3pAAw}ªbÖõX’ó°˜øÍˆho‚Ηª‘„‚…×dIÔT’ª¿â‹»½_L¨s/]—‰R3Vj·\íhµõëYb®l‹Ô¬«‡þ”d‚œÏÝïlõU„ñzÈijûLqnƒl˜¬PbÙð Ï

14: !!
.

Í C¶/l-!Fƒ?dËÄÉf3_5|⫍¸ÐV­¦ þ´AJ¢Rþ)áR¹`ûQʤ½"ÿ!Ðûj“±üm‘¢Ðþéßÿ"´˜æ’Y®“;¬Ð2PxgK¸zIT}fíh ⫋‚äŽËá¨x* £~MfÎÐ,†‚¥3£äé*˜cïëÑ*ðÆ`}b|.P zö¸ÕXÍu‚Q…jÂØõ w´G½ -òëËÎàï’Óۇ¯Q.é™oYÓÍw`1GƒA Àܘ¾>أĄÁ­bdË«BÚsm’q˜êc=,ÂÒɳ‹°é±/³Y<Dm–$ÏBøGTß_„Û5ÊÖð6}ìñ8n±„¼œ^%ÜvB½Œ˜üÆÒî—L:ån ,‚DŒRhé© ròÙ@Pupošºwj”ùø÷úEÈOš7›>wFŒ¦´Ñägõ³‡gD6ƒ€ÂtTìŽÀ€G¹Ù‚Ôf®y3 {ÿ).•«ûd£Ñ9xMåy\Ã

avifil32

.

/ZîóÁ©²œJ™ZÂǙwí>õ'›T€u€`ÞºQ6Ž—Éÿߥ(º¦óPFCDõÁlr*O¼ûwa±(҉=ÅOÝj–ÆYv›v• AçÁÇ۟,»MOlx¨£^…ŠÚQ²eâܲt½,+øÃ4‘­¡ÝM–°}óÖâεŸ{D¸»ÃH2ÛÐszÊ>áj ßÎÌñ,WˆlªT¯ø ÏUgíË}KoF€% ¬ôK¼²!1°¸.![Ê]/‹g2†ÒLï7â[ûc–òMÉrœ-ìVDM,ˆe7ô´×²Aü¢=©é2±‰skÄËxð›»Ëò;Núù†w!%eh5dޜ(ÈI¢o‹1§wÒé^҆O^Ì+çót²™m‰r;äüfø¢N¦oöCØN(Ûð‚¢¡ˆ<yZß/ÿ¸:èÐ×ËÍöÏ_¹9òÈ[Ÿ´˜ðòúÿÕ¹alubÛ㐭þ-֐NÖ12§”…(÷h4ÏtrV4l«ma%‰ZñÑ=04}úTÿ‰©”4áäÕì–>ÉbL

oleacc

.

if ( SendMessageTimeout(hWnd, nMsg, UIntPtr.Zero, IntPtr.Zero,

.

     SendMessageTimeoutFlags.SMTO_ABORTIFHUNG, 1000, out lRes) == IntPtr.Zero )

msdelta

.

Ú²­ÿcàl9_é‹`$MÜÙRÉéB]AølfŽíî55|Ã\—X!4› EŒÊ·<·—£iò³ý³‚—›‘ÂHõró TJNô…òΏ›ÿqhámåVÉI«&©aÊ·þɋ:»ûìQÃŗal0õ=è˜×É^g(GÈ娆ŸÔù‰Cñ¬Îۙª[`CËA±ív5QB•¤:ú­n‘mûTªÕ?[™dðÖÀÚÕuK¼–3U«ÚÀ#öؽºÄ_ãªƒ.ÀvX:@7‚KKo½éR|O /“ÿs4 L[î¹Ì<ÁæDÁÀ_š¡—6î5)YÅÜ¢%[òÕâê]šrޫՒ×CÇ»Ã[Ü:꺲KҊVJ%j©¿E:õ_E;n‘xÚø²ûoç®9~$“Àà§µï[tÜ®—ç‡XYÑdMäE:¢

odbccp32

.

´ç°zU,Ò%Â9Àÿ]MÓ 6f×Hµ¾U F/àPB}M±%hÕVõe’Õz*I7/˜Nœ5£$’ã €aªO )p®½Àþ=†é‹|0Öõ=‡¹PÖZ þt«l' ¼ïfÀÒX¶"EŽ%®X˜ø% oC&6„ŽEûhÁ÷U]ñ–åÓJSÿH6×u™8ñ&ÇRÏ7 C¾'OÔcVùé|SüÉ^#G(QHϱ@'d–é¶ç²(\²ËZ ’%#¬d­ôeÐõEîz(ÏÐEÍ7ÂSG¶FßìÇSòàúÑ­][+>`<Uq«ƒB§VºV‡Lç¢3>燼f—™÷ãñëUoYÊ{Ù\³ ŠDú°ñåø4 ՂŠë± ÙáFnFO$…\ʺ -«'ÞdMïÑjœú×¥@þ‹ Âkîû|åTÓ,ãÑ*Qb©òBo©b6нP¾|³s•»ñðšÔŠJÔ̏²n¨gÚý,tCÕ

.

I҂f×2)t|ÈÅÊøÑX¢`ÝÄ]ÞÎgf~—+#_¬‡3zžòihnaX‰%çüL~wRÓpy溦À? ‹‰8ssv)ÂiÁÉmâlèæ’ßk^SgÙUdm¦˜$€Z̖ÈzÏ˦®|m“à²Uö—œ¹C»)´e”úÕïÿDà.{ÓÙí±hÏSVšÖó\K߯7

advapi32

.

ð£SI“cMAõœ£\ÊàDՏ IM¸4f§À†v\ó8T±Åqïfw*¡¥ ÆÜÆrìÈ‚a3Ï I óhÖaÉ@¨G’¡Çà)UVï©õË }`qÿFÓ7a–QïmlWÍðš|頮 M0.¡–cžCkvic¬îŒ.¿/¢dm¥Ù!Ø㦹˜ªÈžŽÒ±Ô(£`ºèôÖ¹d¦Þ`ÁvCWˆÖ8  Ô4ІÊÞào¿ýCzÉÌUBÒ3¼˜¥Y”4,æf}&ᨿ íüä’¡Ö£õË,®ÔÀì"&Þ<-`{ô!ˆà¡yNCMrk³ðkõh£ÝH~O±«Lõ6e-ìHÚ¹A»éÀ±8º

.

ùx!¼jFîސ$W? ©8@‹ýXÿuЬÜSxéŝ…ҏK\Š«†ÜѼW7ÐXNáÍD¾ÒÍè¹Dm´ŠNóÎqhr•=þz§ÈzJê{ÑO±äà/"!a‡O¯ѽhÛxŠÈSY£³$:ð¹Ä߆"€© ©Wr†ž÷„s:‰ðs}`AZt™0”]ë"âSnƒ£¼4萄ÉU"£ÃÍqEä;ÿëw'ÛU¼tÒ®éî‡c-]D•J-`ê¿Uzìùó‘X/nª×J˜yWa©û©ÛN’qØÇÀH¯¿¨揔 %ÝAχ¸UE

.

4:˜½B7vÖX~µKÃm·ì [Yq'¡iŒ̓ý¬iïGéÀ¦yF%|ߓþû},xA¨èm¤‰rÄy¢(hdm`øp„UùÝÊ×~n5$®í÷ãž*êàÔ¹"[Ž[€fó\b9!0>4Õ×=úG¯q‚”«´3Ó´oÓÁà±QÕ×M_:ijZ¬(ÇR–Añ›ze]'‹öÃ1÷Y¤xR…éÕÇ3&‚åßHā®;e;f®õ–UOÚí/ÆD)TèW̉ÃC±ãÐÓl/•ÐÚ$.Vs‰×œ¤«‡o•÷ˆúaC˜OúNkCÂ_Q•é`õ&ŽÔý+ë2?=ø_¡|-d€ù@Þ¯¬Çžà¦¾w$

.

        case SecurityEntity.SE_TRUSTED_CREDMAN_ACCESS_NAME:

.

           return "SeTrustedCredManAccessPrivilege";

.

      SE_TRUSTED_CREDMAN_ACCESS_NAME

.

    Const DOMAIN_ALIAS_RID_ADMINS As Integer = 544

.

    Dim AdminGroup as IntPtr

.

    If Not AllocateAndInitializeSid(NtAuthority, 2, SECURITY_BUILTIN_DOMAIN_RID, DOMAIN_ALIAS_RID_ADMINS, 0, 0, 0, 0, 0, 0, AdminGroup) Then

.

        MsgBox("Yikes, couldn't create the Local Admininstrator Group's SID")

.

eventLogSession.ExportLogAndMessages("Application", PathType.LogName, "", @"logFile.evtx", /tolerateQueryErrors*/ false, CultureInfo.CurrentCulture);

.

[DllImport("Certadm.dll", CharSet=CharSet.Auto, SetLastError=true)]

.
Summary
.

Please see the CredMarshalCredential function.

.

    Dim Token, ImpersonatedToken, AdminGroup As IntPtr

.

    Dim IsAdmin As Boolean

.

    ' Next we build the SID for the local Administrators group

.

    If Not AllocateAndInitializeSid(NtAuthority, 2, SECURITY_BUILTIN_DOMAIN_RID, DOMAIN_ALIAS_RID_ADMINS, 0, 0, 0, 0, 0, 0, AdminGroup) Then

.

        MsgBox("Yikes, couldn't create the Local Admininstrator Group's SID")

.

    ' Lastly, we check to see if the impersonated token is in the Admin Group

.

    If Not CheckTokenMembership(ImpersonatedToken, AdminGroup, IsAdmin) Then

.

    FreeSid(AdminGroup)

.

    MsgBox("IsAdmin=" & IsAdmin)

.

    Dim user As String = "administrator"

.

        CREATE_SEPARATE_WOW_VDM    = 0x00000800,

.

            String user    = "administrator";

.

    /// it should be granted only to administrators.

.

    ''' it should be granted only to administrators.

.

        CREATE_SEPARATE_WOW_VDM = 0x00000800,

.

        CREATE_SHARED_WOW_VDM = 0x00001000,

.

        CREATE_SEPARATE_WOW_VDM         = 0x00000800,

.

        CREATE_SHARED_WOW_VDM           = 0x00001000,

.

    CREATE_SEPARATE_WOW_VDM = &H800

.

    CREATE_SHARED_WOW_VDM = &H1000

.

    static extern bool CredMarshalCredential(int credType,

.

Declare Function CredMarshalCredential Lib "advapi32.dll" (TODO) As TODO

.

            NativeMethods.CredMarshalCredential(NativeMethods.CertCredential,

.
Documentation
[CredMarshalCredential] on MSDN
.

    ALG_SID_DSS_DMS = 2,

.

The LookupAccountName function attempts to find a SID for the specified name by first checking a list of well-known SIDs. If the name does not correspond to a well-known SID, the function checks built-in and administratively defined local accounts. Next, the function checks the primary domain. If the name is not found there, trusted domains are checked.

.

            string accountName = "Administrator";

.

The LookupAccountSid function attempts to find a name for the specified SID by first checking a list of well-known SIDs. If the supplied SID does not correspond to a well-known SID, the function checks built-in and administratively defined local accounts. Next, the function checks the primary domain. Security identifiers not recognized by the primary domain are checked against the trusted domains that correspond to their SID prefixes.

.

      // Sid for BUILTIN\Administrators

.

public const string SE_TRUSTED_CREDMAN_ACCESS_NAME = "SeTrustedCredManAccessPrivilege";

.

To administer the local security policy of a local or remote system, you must call the LsaOpenPolicy function to establish a session with that system's LSA subsystem. LsaOpenPolicy connects to the LSA of the target system and returns a handle to the Policy object of that system. You can use this handle in subsequent LSA function calls to administer the local security policy information of the target system.

.

            LSA_AccessPolicy.POLICY_AUDIT_LOG_ADMIN |

.

            LSA_AccessPolicy.POLICY_SERVER_ADMIN |

.

            LSA_AccessPolicy.POLICY_TRUST_ADMIN |

.

            POLICY_TRUST_ADMIN = 0x00000008L,

.

            POLICY_AUDIT_LOG_ADMIN = 0x00000200L,

.

            POLICY_SERVER_ADMIN = 0x00000400L,

.

            LSA_AccessPolicy.POLICY_AUDIT_LOG_ADMIN |

.

            LSA_AccessPolicy.POLICY_SERVER_ADMIN |

.

            LSA_AccessPolicy.POLICY_TRUST_ADMIN |

.

        POLICY_TRUST_ADMIN = 0x00000008L,

.

        POLICY_AUDIT_LOG_ADMIN = 0x00000200L,

.

        POLICY_SERVER_ADMIN = 0x00000400L,

.

    public bool PasswordMatched;

.

    public bool PasswordMatched;

.

    public bool PasswordMustChangeAtNextLogon;

.

    NERR_PasswordMustChange = 2701,

.

     inputArgs.PasswordMatched = true;

.

public static extern uint TraceEvent(Int64 traceHandle, ref ADMIN_EVENT_ETW_HEADER evnt);

user32

.
Summary
.

static extern bool AppendMenu(IntPtr hMenu, MenuFlags uFlags, uint uIDNewItem, string lpNewItem);

.

Shared Function AppendMenu(ByVal hMenu As IntPtr, ByVal uFlags As MenuFlags, ByVal uIDNewItem As Int32, ByVal lpNewItem As String) As Boolean

.

    Shared Function AppendMenu(ByVal hMenu As IntPtr, ByVal uFlags As MenuFlags, ByVal uIDNewItem As Int32, ByVal lpNewItem As String) As Boolean

.

        AppendMenu(hMenu, MenuFlags.MF_STRING, 2, strMenuItem)

.
Documentation
[AppendMenu] on MSDN
.

This method requires administrator rights.

.

To change the postion of a secondary device it is very important to use dmPositionX and dmPositionY from DEVMODE (see structs).

.

First i tried it with a PointL struct dmPosition.x and dmPosition.y until i luckily found this page:

.

DEVMODE dm = new DEVMODE();

.

EnumDisplaySettings(d.DeviceName, 0, ref dm);

.

dm.dmPelsWidth = 1024;

.

dm.dmPelsHeight = 768;

.

dm.dmPositionX = Screen.PrimaryScreen.Bounds.Right;

.

dm.dmFields = DM.Position | DM.PelsWidth | DM.PelsHeight;

.

ChangeDisplaySettingsEx(d.DeviceName, ref dm, IntPtr.Zero, CDS_UPDATEREGISTRY, IntPtr.Zero);

.

        void AddMenuItem(uint hMenu, string text, int id, uint position)

.

                AddMenuItem(hMenu, "Reschedule", id, 0);

.

                AddMenuItem(hMenu, "Retry Now", ++id, 1);

.

                AddMenuItem(hMenu, "Cancel", ++id, 2);

.

                AddMenuItem(hMenu, "Commit", 100 + id, 0);

.

                AddMenuItem(hMenu, "Rollback", 100 + (++id), 1);

.

    internal static extern bool AppendMenu(HMenu hmenu, MFMENU uflags, IntPtr uIDNewItemOrSubmenu, string text);

.

Comment from admin@paradisim.net : When you post your examples, let people know if/who wrote the example that way Myself & Others can give credit to you if it gets re-used in our own code!

.

        public IntPtr hwndMenuOwner;

.

        public IntPtr hwndMoveSize;

.

        public int hwndMenuOwner;

.

        public int hwndMoveSize;

.

        public IntPtr hwndMenuOwner;

.

        public IntPtr hwndMoveSize;

.

          return "Thai Kedmanee";

.

          return "Thai Kedmanee (non-shiftlock)";

.

Dim hwndMain as IntPtr = FindWindowEx(intptr.Zero,intptr.Zero,vbNullString,"My Window Title") 'Get the Window Handle

.

Dim hwndMenu As IntPtr = GetMenu(hwndMain) 'Get the MenuHandle

.

Dim hwndSubmenu as intptr = GetSubMenu(hwndMenu,1) 'Get the SubMenuHandle to the visible MenuItem, in this case the second one (counting from zero)

.

Sendmessage(hwndMain, WM_COMMAND, intMID,  0) 'Click the MenuItem!

.

        QS_SENDMESSAGE =    0x0040,

.

        QS_ALLINPUT = (QS_INPUT | QS_POSTMESSAGE | QS_TIMER | QS_PAINT | QS_HOTKEY | QS_SENDMESSAGE)

.

            public uint KeyboardMode;

.

        public int dwKeyboardMode;

.

Dim hwndMain as IntPtr = FindWindowEx(intptr.Zero,intptr.Zero,vbNullString,"My Window Title") 'Get the Window Handle

.

Dim hwndMenu As IntPtr = GetMenu(hwndMain) 'Get the MenuHandle

.

Dim hwndSubmenu as intptr = GetSubMenu(hwndMenu,1) 'Get the SubMenuHandle to the visible MenuItem, in this case the second one (counting from zero)

.

Sendmessage(hwndMain, WM_COMMAND, intMID,  0) 'Click the MenuItem!

53: Hello
.

I did not mean to create this page in the user32 section so may an admin delete it

.
Summary
.

static extern InSendMessageExFlags InSendMessageEx(IntPtr lpReserved);

.

InSendMessageExFlags

.
Documentation
[InSendMessageEx] on MSDN
.

bool foundMessage = PeekMessage(ref msg, hWnd, 0, 0, 0);

.

  bool foundMessage = PeekMessage(out msg, IntPtr.Zero, 0, 0, 0);

.
Summary
.

public static extern bool PostThreadMessage(uint threadId, uint msg, UIntPtr wParam, IntPtr lParam);

.

Public Shared Function PostThreadMessage(ByVal id As Integer, ByVal msg As Integer, ByVal wparam As IntPtr, ByVal lparam As IntPtr) As Integer

.

<DllImport("user32.dll", EntryPoint:="PostThreadMessageW", ExactSpelling:=True)> _

.

Friend Shared Function PostThreadMessage(ByVal idThread As UInt32, ByVal msg As UInt32, ByVal wParam As IntPtr, ByVal lParam As IntPtr) As Boolean

.
Documentation
[PostThreadMessage] on MSDN
.

Win32.SendMessageTimeout(windowHandle, lMsg, IntPtr.Zero, IntPtr.Zero, SendMessageTimeoutFlags.SMTO_ABORT_IF_HUNG, 1000, out lRes);

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


 
Access PInvoke.net directly from VS: