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

iphlpapi

.
Import
credui,advapi32,gdi32,kernel32,ole32,shell32,user32,glossary,coredll,rasapi32,mpr,netapi32,uxtheme,avifil32,aygshell,winscard,crypt32,secur32,wtsapi32,shlwapi,winspool,oleacc,rapi,oleaut32,winfax,odbc32,msi,cards,powrprof,urlmon,xolehlp,twain_32,winmm,wininet,comdlg32,imm32,ntdsapi,odbccp32,glu32,mapi32,Constants,Delegates,Enums,Interfaces,Structures

icmp

.
Import
credui,advapi32,gdi32,kernel32,ole32,shell32,user32,glossary,coredll,rasapi32,mpr,netapi32,uxtheme,avifil32,aygshell,winscard,crypt32,secur32,wtsapi32,shlwapi,winspool,oleacc,rapi,oleaut32,winfax,odbc32,msi,cards,powrprof,urlmon,xolehlp,twain_32,winmm,wininet,comdlg32,imm32,ntdsapi,odbccp32,glu32,mapi32,Constants,Delegates,Enums,Interfaces,Structures

glu32

.
Import
credui,advapi32,gdi32,kernel32,ole32,shell32,user32,glossary,coredll,rasapi32,mpr,netapi32,uxtheme,avifil32,aygshell,winscard,crypt32,secur32,wtsapi32,shlwapi,winspool,oleacc,rapi,oleaut32,winfax,odbc32,msi,cards,powrprof,urlmon,xolehlp,twain_32,winmm,wininet,comdlg32,imm32,ntdsapi,odbccp32,opengl32,mapi32,Constants,Delegates,Enums,Interfaces,Structures

opengl32

.

    public static extern void glGetMapiv(uint target, uint query, int[] v);

.
Import
credui,advapi32,gdi32,kernel32,ole32,shell32,user32,glossary,coredll,rasapi32,mpr,netapi32,uxtheme,avifil32,aygshell,winscard,crypt32,secur32,wtsapi32,shlwapi,winspool,oleacc,rapi,oleaut32,winfax,odbc32,msi,cards,powrprof,urlmon,xolehlp,twain_32,winmm,wininet,comdlg32,imm32,ntdsapi,odbccp32,glu32,mapi32,Constants,Delegates,Enums,Interfaces,Structures

mapi32

.

[DllImport(@"C:\Program Files\Microsoft Office\Office15\OLMAPI32.dll", EntryPoint = "HrGetAutoDiscoverXML", CharSet = CharSet.Unicode)]

.

Call MAPIInitialize before this function.

.
Summary
MAPIAddress - Creates or modifies a set of address list entries.
.

  /// The MAPIAddress function creates or modifies a set of address list entries.

.

  [DllImport("MAPI32.DLL", CharSet=CharSet.Ansi)]

.

  public static extern uint MAPIAddress(IntPtr lhSession, IntPtr ulUIParam, string lpszCaption,

.

MAPI

.

MAPI

.

This is a COM object that is called through the RCW. Beware, the messaging team at MS will not support any calls to MAPI32.DLL or CDO 1.21 from managed code. Best bet, use Exchange 12's new Managed API.

.

MSDN says that MAPI does not strictly adhere to the COM standard. Perhaps this is one reason why MS won't support this.

.
Documentation
[MAPIAddress] on MSDN
.
Summary
MAPIDeleteMail - Deletes a message.
.

  /// The MAPIDeleteMail function deletes a message.

.

  [DllImport("MAPI32.DLL", CharSet=CharSet.Ansi)]

.

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

.

MAPI

.
Documentation
[MAPIDeleteMail] on MSDN
.
Summary
MAPIDetails - Displays a dialog box containing the details of a selected address list entry.
.

  /// The MAPIDetails function displays a dialog box containing the details of a selected address list entry.

.

  [DllImport("MAPI32.DLL", CharSet=CharSet.Ansi)]

.

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

.

    MapiRecipDesc lpRecip, uint flFlags, uint ulReserved);

.

MAPI

.

MAPI

.
Documentation
[MAPIDetails] on MSDN
.
Summary
MAPIFindNext - Retrieves the next (or first) message identifier of a specified type of incoming message.
.

  /// The MAPIFindNext function retrieves the next (or first) message identifier of a specified type

.

  [DllImport("MAPI32.DLL", CharSet=CharSet.Ansi)]

.

  public static extern uint MAPIFindNext(IntPtr lhSession, IntPtr ulUIParam, string lpszMessageType,

.

MAPI

.
Documentation
[MAPIFindNext] on MSDN
.
Summary
MAPIFreeBuffer - Frees a MAPI-allocated memory buffer.
.

  /// The MAPIFreeBuffer function frees a MAPI-allocated memory buffer.

.

  [DllImport("MAPI32.DLL", CharSet=CharSet.Ansi)]

.

  public static extern uint MAPIFreeBuffer(IntPtr lpBuffer);

.

This function should always be used to free any storage structures returned by MAPI functions.

.
Documentation
[MAPIFreeBuffer] on MSDN
.

[DllImport(@"C:\Program Files\Microsoft Office\Office15\OLMAPI32.dll", EntryPoint = "MAPIInitialize", CharSet = CharSet.Unicode)]

.

public static extern int MAPIInitialize(IntPtr lpMapiInit);

.

int res = MAPIInitialize(IntPtr.Zero);

.

  // do something useful with MAPI

.
Documentation
[MAPIInitialize] on MSDN
.
Summary
MAPILogoff - The MAPILogoff function ends a session with the messaging system.
.

/// The MAPILogoff function ends a session with the messaging system.

.

[DllImport("MAPI32.DLL", CharSet=CharSet.Ansi)]

.

private static extern uint MAPILogoff(IntPtr lhSession, IntPtr ulUIParam, uint flFlags, uint ulReserved);

.

''' The MAPILogoff function ends a session with the messaging system.

.

<DllImport("MAPI32.DLL", CharSet:=CharSet.Ansi)> _

.

Private Shared Function MAPILogoff(ByVal lhSession As IntPtr, ByVal ulUIParam As IntPtr, ByVal flFlags As UInteger, ByVal ulReserved As UInteger) As UInteger

.

MAPI

.

        errorCode = MAPILogoff( session, parentWindowPtr , 0, 0 );

.

        errorCode = MAPILogoff(session, parentWindowPtr, 0, 0)

.
Documentation
[MAPILogoff] on MSDN
.
Summary
MAPILogon - Begins a Simple MAPI session, loading the default message store and address book providers.
.

  /// The MAPILogon function begins a Simple MAPI session, loading the default message store

.

  [DllImport("MAPI32.DLL", CharSet=CharSet.Ansi)]

.

  public static extern uint MAPILogon(IntPtr ulUIParam, string lpszProfileName, string lpszPassword,

.

<DllImport("MAPI32.dll", SetLastError:=True)> _

.

    Private Shared Function MAPILogon(ByVal uiParam As Integer, _

.

MAPI

.

Microsoft Important Note: MAPI32 is not supported in a managed environment, memory leaks may be seen. Use the current alternatives: System.Net.Mail or WebDav or Exhange 2007 webservice interface.

.

  uint error = MAPILogon(hwnd, null, null, MAPI_LOGON_UI, 0, ref session);

.
Documentation
[MAPILogon] on MSDN
.

    public class MapiMessage

.

    Public Class MapiMessage

.
Documentation
[MapiMessage] on MSDN
.
Summary
MAPIReadMail - Retrieves a message for reading.
.

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

.

  [DllImport("MAPI32.DLL", CharSet=CharSet.Ansi)]

.

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

.

  <Runtime.InteropServices.DllImport("MAPI32.DLL", CharSet:=System.Runtime.InteropServices.CharSet.Ansi)> _

.

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

.

MAPI

.

MAPI

.
Documentation
[MAPIReadMail] on MSDN
.
Summary
MAPIResolveName - Transforms a message recipient's name as entered by a user to an unambiguous address list entry.
.

  /// The MAPIResolveName function transforms a message recipient's name as entered by a user

.

  [DllImport("MAPI32.DLL", CharSet=CharSet.Ansi)]

.

  public static extern uint MAPIResolveName(IntPtr lhSession, IntPtr ulUIParam, string lpszName,

.

    uint flFlags, uint ulReserved, ref MapiRecipDesc lppRecips);

.

MAPI

.

MAPI

.

  MapiRecipDesc mpd = null;

.

  MAPIResolveName(lhSessionNull, this.Handle, new String(textbox.Text.ToCharArray()), Mapi.MAPI_DIALOG, 0, ref mpd);

.
Documentation
[MAPIResolveName] on MSDN
.
Summary
MAPISaveMail - Saves a message into the message store.
.

  /// The MAPISaveMail function saves a message into the message store.

.

  [DllImport("MAPI32.DLL", CharSet=CharSet.Ansi)]

.

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

.

    MapiMessage lpMessage, uint flFlags, uint ulReserved, string lpszMessageID);

.

MAPI

.

MAPI

.
Documentation
[MAPISaveMail] on MSDN
.
Summary
MAPISendDocuments - Sends a standard message with one or more attached files and a cover note.
.

  /// The MAPISendDocuments function sends a standard message with one or more attached files and a cover note.

.

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

.

  [DllImport("MAPI32.DLL", CharSet=CharSet.Ansi)]

.

  public static extern uint MAPISendDocuments(IntPtr ulUIParam, string lpszDelimChar, string lpszFullPaths,

.

MAPI

.
Caution
I'm finding that calling this function sets your Current Working Directory to something other than what it was before the call is made. In my case, it was setting it to @"C:\Program Files\Common Files\SYSTEM\MSMAPI\1033"
.

MAPISendDocuments (....);

.
Documentation
[MAPISendDocuments] on MSDN
.
Summary
MAPISendMail - Sends a message.
.

  /// The MAPISendMail function sends a message.

.

  /// This function differs from the MAPISendDocuments function in that it allows greater

.

  [DllImport("MAPI32.DLL", CharSet=CharSet.Ansi)]

.

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

.

    MapiMessage lpMessage, uint flFlags, uint ulReserved);

.

    <DllImport("MAPI32.DLL")> _

.

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

.

MAPI

.

MAPI

.

This signature is valid, if the MapiMessage is defined as a class. If MapiMessage is defined as a structure a 'ref' has to be added before 'MapiMessage lpMessage' parameter

.

Watch it! MAPI32 is not supported from managed code [http://blogs.msdn.com/mstehle/archive/2007/10/03/fyi-why-are-mapi-and-cdo-1-21-not-supported-in-managed-net-code.aspx]

.

    [DllImport("MAPI32.DLL")]

.

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

.

        MapiMessage msg = new MapiMessage();

.

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

.

        int size = Marshal.SizeOf(typeof(MapiFileDesc));

.

        MapiFileDesc mapiFileDesc = new MapiFileDesc();

.

        mapiFileDesc.position = -1;

.

        mapiFileDesc.name = Path.GetFileName(fileName);

.

        mapiFileDesc.path = fileName;

.

        Marshal.StructureToPtr(mapiFileDesc, (IntPtr)ptr, false);

.

    public class MapiMessage

.

    public class MapiFileDesc

.
Documentation
[MAPISendMail] on MSDN
.

[DllImport(@"C:\Program Files\Microsoft Office\Office15\OLMAPI32.dll", EntryPoint = "MAPIUninitialize", CharSet = CharSet.Unicode)]

.

public static extern void MAPIUninitialize();

.

int res = MAPIInitialize(IntPtr.Zero);

.

  // do something useful with MAPI

.

  // call MAPIUninitialize after the work with MAPI

.

  MAPIUninitialize();

.
Documentation
[MAPIUninitialize] on MSDN
.
Namespace
mapi32
.
Description
mapi32.dll
.
Title
mapi32.dll

dwmapi

.

[DllImport("dwmapi.dll")]

.

<DllImport("dwmapi.dll")> _

.

[DllImport("dwmapi.dll")]

.

<DllImport("dwmapi.dll")> _

.

      [DllImport("dwmapi.dll", PreserveSig = false)]

.

    <DllImport("dwmapi.dll")> _

.

[DllImport("dwmapi.dll")]

.

<DllImport("dwmapi.dll")> _

.

[DllImport("dwmapi.dll", PreserveSig = false)]

.

<DllImport("dwmapi.dll")> _

.

[DllImport("dwmapi.dll", EntryPoint = "#127", PreserveSig = false)]

.

    [DllImport("dwmapi.dll", EntryPoint = "#127", PreserveSig = false)]

.

[DllImport("dwmapi.dll")]

.

[DllImport("dwmapi.dll")]

.

Declare Function DwmGetWindowAttribute Lib "dwmapi.dll" (TODO) As TODO

.

[DllImport("dwmapi.dll")]

.

<DllImport("dwmapi.dll")> _

.

go to http://www.pinvoke.net/default.aspx/dwmapi.DwmSetColorizationParameters

.

[DllImport("dwmapi.dll", PreserveSig = false)]

.

<DllImport("dwmapi.dll")>

.

    [DllImport("dwmapi.dll", SetLastError=true)]

.

Declare Function DwmRegisterThumbnail Lib "dwmapi.dll" (ByVal Dest as IntPtr, ByVal Src as IntPtr, ByRef Thumb as IntPtr) As Integer

.

    [DllImport("dwmapi.dll", EntryPoint = "#131", PreserveSig = false)]

.

    [DllImport("dwmapi.dll", EntryPoint = "#131", PreserveSig = false)]

.

    [DllImport("dwmapi.dll")]

.

    Public Declare Function DwmUnregisterThumbnail Lib "dwmapi.dll" (ByVal Thumb as IntPtr) As Integer

.

[DllImport("dwmapi.dll", PreserveSig = true)]

.

Public Declare Function DwmUpdateThumbnailProperties Lib "dwmapi.dll" (ByVal hThumbnail as IntPtr, ByRef props as DWM_THUMBNAIL_PROPERTIES) As Integer

.

[DllImport("dwmapi.dll", SetLastError=true)]

.

Declare Function TaskDialog Lib "dwmapi.dll" (TODO) As TODO

.

[DllImport("dwmapi.dll", SetLastError=true)]

.

Declare Function VistaBridge Lib "dwmapi.dll" (TODO) As TODO

.
Namespace
dwmapi
.
Description
dwmapi.dll
.
Title
dwmapi

gdiplus

.

Declare Function GdipCreateBitmapFromGdiDib Lib "GdiPlus.dll" (ByRef GdiBitmapInfo As BITMAPINFO, ByVal GdiBitmapData As Long, ByRef bitmap As Long) As Status

gdi32

.

static extern IntPtr CreateDIBitmap(IntPtr hdc, [In] ref BITMAPINFOHEADER

.

   lpbmih, uint fdwInit, byte [] lpbInit, [In] ref BITMAPINFO lpbmi,

.

ByRef lpbmih As BITMAPINFOHEADER, _

.

ByRef lpbmi As BITMAPINFO, _

.

BITMAPINFOHEADER

.

BITMAPINFO

.

static extern IntPtr CreateDIBSection(IntPtr hdc, [In] ref BITMAPINFO pbmi,

.

    ByRef pbmi As BITMAPINFO, ByVal iUsage As System.UInt32, _

.

BITMAPINFO

.

The BITMAPINFO structure defines the dimensions and color information for a DIB, it contains the members

.

BITMAPINFOHEADER structure (contains information about the dimensions of color format) and bmiColors which contains one of the following:

.

See MSDN Documentation for BITMAPINFO concerning specific details concerning structure members.

.

/// <param name="lpvBits">A pointer to a buffer to receive the bitmap data. If this parameter is <see cref="IntPtr.Zero"/>, the function passes the dimensions and format of the bitmap to the <see cref="BITMAPINFO"/> structure pointed to by the <paramref name="lpbi"/> parameter.</param>

.

/// <param name="lpbi">A pointer to a <see cref="BITMAPINFO"/> structure that specifies the desired format for the DIB data.</param>

.

/// <param name="uUsage">The format of the bmiColors member of the <see cref="BITMAPINFO"/> structure. It must be one of the following values.</param>

.

/// If the lpvBits parameter is NULL and GetDIBits successfully fills the <see cref="BITMAPINFO"/> structure, the return value is nonzero.

.

static extern int GetDIBits([In] IntPtr hdc, [In] IntPtr hbmp, uint uStartScan, uint cScanLines, [Out] byte[] lpvBits, ref BITMAPINFO lpbi, DIB_Color_Mode uUsage);

.

BITMAPINFO

.

   byte [] lpvBits, [In] ref BITMAPINFO lpbmi, uint fuColorUse);

.

BITMAPINFO

.

   int nSrcHeight, byte [] lpBits, [In] ref BITMAPINFO lpBitsInfo, uint iUsage,

.

BITMAPINFO

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


 
Access PInvoke.net directly from VS: