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]

cards

.

LèJе”‹¤1£yî .9îEÏ0êtÒ!½3jÞÓ[rÄÏvHjÇs‡è’ù´0©à1Kÿ¼¤™xl"Õ$–‹AÙuv¨ú‹PK“¹[‡XÂG>í+mÒE}ÁDݱ®OÆú6ã"Äü;åÅ]Gúžµ%£P6%¿A™Nã–@Ё/Ra³¨ŽæÐÔ|ÐÒNÑu®]dM~ãÅ\Ç5-ò-}±"ïÝÀI'ÿªÓÏÓªCKñNç"v ­òÚEÓäMñÑ)ufæªhDbø!“K°ñČÐG õdÈyDˆ6€KØ!l˜

.

        public Int16 reservedMenu =        0;

crypt32

.

The CryptVerifyDetachedMessageSignature function verifies a signed message's signature.

.

    static internal extern bool CryptVerifyDetachedMessageSignature(

.

Declare Function CryptVerifyDetachedMessageSignature Lib "crypt32.dll" (TODO) As TODO

.

  public void VerifyDetachedMessageSignature2(byte[] messageData, byte[] signatureData, out byte[] p_x509)

.

        bool res = CryptoApiProvider.CryptVerifyDetachedMessageSignature(

.
Documentation
[CryptVerifyDetachedMessageSignature] on MSDN

mapi32

.

õ Ý%(í™b- :yô$(º~FϙàW7§1V(säkÃI¹`Gxónr;ÃŤò‚ÔeX{oÅÚ&0ÿRÃÒÃdm¥!ßvH7†w°!Ý΁€Ä¬æÛłt5“»ìñAÙø›¸Ç?ÕX(ØÚ ¹Öç¸;<éHÂҕq*‡jy½–z§cÖ,ä)a7½×º³3’0%r¦ßa‡:Èb 4ËSAP;¿ÀÂPÔò¤´–¶Ã‰©_֌™¶

.

    string lpszSeedMessageID, uint flFlags, uint ulReserved, StringBuilder lpszMessageID);

.

To get the Message ID of the first message, lpszSeedMessageID should be null or should point to an empty string. Pass null or an empty string for lpszMessageType to find InterPersonal Message (IPM).

.
Summary
MAPIReadMail - Retrieves a message for reading.
.

  /// The MAPIReadMail function retrieves a message for reading.

.

  public static extern uint MAPIReadMail(IntPtr lhSession, IntPtr ulUIParam, string lpszMessageID,

.

   Public Shared Function MAPIReadMail(ByVal lhSession As IntPtr, ByVal ulUIParam As IntPtr, ByVal lpszMessageID As String,

.
Documentation
[MAPIReadMail] on MSDN
.

  /// message. MAPISendDocuments differs from the MAPISendMail function in that it allows

.
Summary
MAPISendMail - Sends a message.
.

  /// The MAPISendMail function sends a message.

.

  public static extern uint MAPISendMail(IntPtr lhSession, IntPtr ulUIParam,

.

    Private Shared Function MAPISendMail(ByVal sess As IntPtr, ByVal hwnd As IntPtr, ByVal message As MapiMessage,

.

    static extern int MAPISendMail(IntPtr sess, IntPtr hwnd, MapiMessage message, int flg, int rsv);

.

    public int SendMail(string fileName)

.

        int result = MAPISendMail(new IntPtr(0), new IntPtr(0), msg, 0x00000001 | 0x00000008, 0);

.
Documentation
[MAPISendMail] on MSDN

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Ú¾ì

10: !
.

¦ŠˆÎ>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";

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!

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

.

    Private Shared Function SendMessage(ByVal hWnd As IntPtr,

.

        SendMessage(Handle, WM_NCLBUTTONDOWN, HT_CAPTION, 0)

.

private static extern int SendMessage(IntPtr hWnd, int msg , int wParam , ref int lParam);

.

   SendMessage(ctrl.Handle, WM_SYSCOMMAND, MOUSE_MOVE, ref nul);

.

  private static extern UInt32 SendMessage(

.

  lResult = SendMessage(  // returns LRESULT in lResult

.

    private static extern uint SendMessage(

.

    private static extern uint SendMessage(

.

        return (int)SendMessage(this._handle, SB_GETPARTS, 0, 0);

.

        uint length = (uint)SendMessage(this._handle, SB_GETTEXTLENGTH, index, 0);

.

            StatusBar.SendMessage(this._handle, SB_GETTEXT, (IntPtr)index, allocated);

.
Summary
.

public static extern IntPtr SendMessageTimeout(

.

    SendMessageTimeoutFlags fuFlags,

.

public static extern IntPtr SendMessageTimeout(

.

    SendMessageTimeoutFlags flags,

.

[DllImport("user32.dll", EntryPoint = "SendMessageTimeout", SetLastError=true, CharSet=CharSet.Auto)]

.

public static extern uint SendMessageTimeoutText(

.

    SendMessageTimeoutFlags flags,

.

[DllImport("user32.dll", EntryPoint = "SendMessageTimeout", CharSet = CharSet.Auto)]

.

public static extern int SendMessageTimeout(

.

SendMessageTimeoutFlags

.

Public Sub SendMessageTimeout(ByVal windowHandle As IntPtr,ByVal Msg As Integer,ByVal wParam As IntPtr,ByVal lParam As IntPtr,ByVal flags As SendMessageTimeoutFlags,ByVal timeout As Integer,ByRef result As IntPtr)

.

Public Shared Function SendMessageTimeout(ByVal windowHandle As IntPtr, ByVal Msg As Integer, ByVal wParam As IntPtr, ByVal lParam As IntPtr, ByVal flags As SendMessageTimeoutFlags, ByVal timeout As Integer, ByRef result As IntPtr) As IntPtr

.

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

.

    int result = SendMessageTimeout(hwnd, WM_GETTEXTLENGTH, 0, 0, 0X2C, 5, out length); //0X2C = SMTO_ABORTIFHUNG | SMTO_BLOCK | SMTO_NOTIMEOUTIFNOTHUNG | SMTO_ERRORONEXIT

.
Documentation
[SendMessageTimeout] on MSDN
.
Summary
.

static extern bool SendMessageCallback(IntPtr hWnd, uint Msg, UIntPtr wParam,

.

    IntPtr lParam, SendMessageDelegate lpCallBack, UIntPtr dwData);

.

C# signature for the SendMessageDelegate:

.

delegate void SendMessageDelegate(IntPtr hWnd, uint uMsg, UIntPtr dwData, IntPtr lResult);

.
Documentation
[SendMessageCallback] on MSDN
.
Summary
.

public static extern IntPtr SendMessageTimeout(

.

    SendMessageTimeoutFlags fuFlags,

.

public static extern IntPtr SendMessageTimeout(

.

    SendMessageTimeoutFlags flags,

.

[DllImport("user32.dll", EntryPoint = "SendMessageTimeout", SetLastError=true, CharSet=CharSet.Auto)]

.

public static extern uint SendMessageTimeoutText(

.

    SendMessageTimeoutFlags flags,

.

SendMessageTimeoutFlags

.

Public Sub SendMessageTimeout(ByVal windowHandle As IntPtr,ByVal Msg As Integer,ByVal wParam As IntPtr,ByVal lParam As IntPtr,ByVal flags As SendMessageTimeoutFlags,ByVal timeout As Integer,ByRef result As IntPtr)

.

Public Shared Function SendMessageTimeout(ByVal windowHandle As IntPtr, ByVal Msg As Integer, ByVal wParam As IntPtr, ByVal lParam As IntPtr, ByVal flags As SendMessageTimeoutFlags, ByVal timeout As Integer, ByRef result As IntPtr) As IntPtr

.

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

.
Documentation
[SendMessageTimeout] on MSDN
.

Public Declare Function SendNotifyMessage Lib "user32.dll" Alias "SendMessageA" ( _

.

    static extern int SendMessage(IntPtr hWnd, int Msg, IntPtr wParam, IntPtr lParam);

.

            SendMessage(hWndNextWindow, m.Msg, m.WParam, m.LParam);

.

            SendMessage(hWndNextWindow, m.Msg, m.WParam, m.LParam);

.

    public void UnmanagedMoveCursorOverButton(Button button)

.

    public void ManagedMoveCursorOverButton(Button button)

.

    public void UnmanagedMoveCursorOverButton(Button button)

.

    public void ManagedMoveCursorOverButton(Button button)

.

    static extern IntPtr SendMessage(IntPtr hWnd, UInt32 Msg, int wParam, int lParam);

.

    SendMessage(proc.MainWindowHandle, WM_SYSCOMMAND, SC_MAXIMIZE, 0);

.
Note
This SetWindowText will set text to the controls(textbox for example) in the same process. If they exist in other processes, use SendMessage instead... - jp
45: TCITEM
.

    int res = SendMessage(handle, TCM_GETITEMA, index, tcitemPtr);

.

    GuardModifierflag = 0x100,

.

void ProcessThisThreadMessagesUntilFOO()

netapi32

.

Dmôµ‡0éC“àEÞÏ?D*–$½Z¬ÜX›Å\–~£Î%PwA‡³t…¥å+ó;Ò4öºìªœ9½;Ì»[Mò2c]—zæñÔXNª²ýa#ŸüÒ(³ZR°Œˆ;;8//ïÒ7z¢yûpV`î2IUØaK&±åÞB«²Æ*ø+N¨8vý­„C~³¤–w;p1GMÔ

.

    ServerMixedMode = 2,

.

    MixedMode = 2,

.

        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,

.

private static extern Int32 NetLocalGroupAddMembers(

.

Declare Function NetLocalGroupAddMembers Lib "netapi32.dll" (TODO) As TODO

.

    extern static int NetLocalGroupAddMembers(string ServerName, string LocalGroupName,

.

    //Error codes associated with 'NetLocalGroupAddMembers'

.

        MakeUserAdmin(@"GEDEV\Engineer_1");

.

    static bool MakeUserAdmin(string UserName)

.

        // Sid for BUILTIN\Administrators

.

        // add the user to the administrators group

.

        if ((iRetVal = NetLocalGroupAddMembers(null, sbName.ToString(), 3, ref info, 1)) != 0)

.

    public static void AddMemberToLocalGroup(string groupName, SecurityIdentifier sid)

.

            var result = NetLocalGroupAddMembers(null, groupName, 0, ref info3, 1);

.
Documentation
[NetLocalGroupAddMembers] on MSDN
.

            // Sid for BUILTIN\Administrators

.

            // Sid for BUILTIN\Administrators

.

        RetGroups =DsDomain.GetLocalGroupMembers(null,"administrators");        

.

    ''' the access control list (ACL) for the securable object. The default ACL permits only Domain Admins and Account Operators to call this function.

.

    ''' On a member server or workstation, only Administrators and Server Operators can call this function.

.

    ''' Admin, Accounts, Print, or Server Operator group membership is required to successfully execute NetMessageBufferSend on a remote server.

.
Summary
Queries the redirector to retrieve the optional features the remote system supports. Features include Unicode, Remote Procedure Call (RPC), and Remote Administration Protocol support.
.

     RemoteAdminProtocol = 2

.

    RemoteAdminProtocol = 2,

.

    ''' <remarks>Only members of the Administrators or Server Operators local group can successfully execute the NetSessionDel function.</remarks>

.

        ' to get an Administrative Share of that type

.

            'Need admin for level 2, drop to level 1

.

        'Need admin for level 2, drop to level 1

.

lpAccount - (in) Pointer to a constant string that specifies the account name to use when connecting to the domain controller. The string must specify either a domain NetBIOS name and user account (for example, "REDMOND\user") or the user principal name (UPN) of the user in the form of an Internet-style login name (for example, "someone@example.com"). If this parameter is NULL, the caller's context is used.

.

            DWORD PreferedMaximumSize,

.

    ByVal PreferedMaximumSize As UInt32, _

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


 
Access PInvoke.net directly from VS: