Click here to Skip to main content
15,891,725 members
Home / Discussions / C#
   

C#

 
GeneralRe: i want to solve this Pin
OriginalGriff22-Jan-11 0:41
mveOriginalGriff22-Jan-11 0:41 
GeneralRe: i want to solve this Pin
Dave Kreskowiak22-Jan-11 9:03
mveDave Kreskowiak22-Jan-11 9:03 
GeneralRe: i want to solve this Pin
Estys22-Jan-11 11:26
Estys22-Jan-11 11:26 
AnswerRe: i want to solve this Pin
Estys21-Jan-11 23:00
Estys21-Jan-11 23:00 
Questionhow to run a sever when the IIS runs? Pin
xaq69388826521-Jan-11 21:55
xaq69388826521-Jan-11 21:55 
AnswerRe: how to run a sever when the IIS runs? Pin
R. Giskard Reventlov21-Jan-11 22:12
R. Giskard Reventlov21-Jan-11 22:12 
QuestionMAPI Windows Live mail Pin
M Riaz Bashir21-Jan-11 20:31
M Riaz Bashir21-Jan-11 20:31 
AnswerRe: MAPI Windows Live mail Pin
dan!sh 21-Jan-11 22:00
professional dan!sh 21-Jan-11 22:00 
This is something I had written (or may be copied) long ago. Not even sure if this works but surely gives something to you to start with:
class SendMail
    {

        #region Constants

        private const string sSubject = "You got spammed!";

        #endregion

        #region Variables

        List<MapiRecipDesc> aoRecipients = new List<MapiRecipDesc>();

        #endregion

        #region Classes

        [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
        public class MapiMessage
        {
            public int iReserved;
            public string sSubject;
            public string sNoteText;
            public string sMessageType;
            public string sDateReceived;
            public string sConversationID;
            public int iFlags;
            public IntPtr oOriginator;
            public int iRecipCount;
            public IntPtr oRecips;
            public int iFileCount;
            public IntPtr iFiles;
        }

        [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
        public class MapiRecipDesc
        {
            public int iReserved;
            public int iRecipClass;
            public string sName;
            public string sAddress;
            public int iIDSize;
            public IntPtr iEntryID;
        }

        #endregion

        #region Constructors

        public SendMail()
        {
            // Default constructor
            MapiMessage oMsg = new MapiMessage();
            oMsg.sSubject = sSubject;
            MapiRecipDesc recipient = new MapiRecipDesc();
            recipient.iRecipClass = 1;
            recipient.sName = "mail_id";
            aoRecipients.Add(recipient);
            oMsg.oRecips = GetRecipients(out oMsg.iRecipCount);
            int iError = MAPISendMail(new IntPtr(0), new IntPtr(0), oMsg, 9, 0);
        }

        #endregion

        #region Methods

        [DllImport("Mapi32.dll")]
        static extern int MAPISendMail(IntPtr oSess, IntPtr oHwnd, MapiMessage sMsg, int iFlag, int iRsv);

        IntPtr GetRecipients(out int iReciCount)
        {
            //
            // This method gets the mentioned recipient mail id
            //
            iReciCount = 0;
            if (aoRecipients.Count == 0)
                return IntPtr.Zero;

            int iSize = Marshal.SizeOf(typeof(MapiRecipDesc));
            IntPtr oIntPtr = Marshal.AllocHGlobal(aoRecipients.Count * iSize);

            int iPtr = (int)oIntPtr;
            foreach (MapiRecipDesc oReciDesc in aoRecipients)
            {
                Marshal.StructureToPtr(oReciDesc, (IntPtr)iPtr, false);
                iPtr += iSize;
            }

            iReciCount = aoRecipients.Count;
            return oIntPtr;
        }

        #endregion
    }

"Your code will never work, Luc's always will.", Richard MacCutchan[^]

GeneralRe: MAPI Windows Live mail Pin
M Riaz Bashir21-Jan-11 22:40
M Riaz Bashir21-Jan-11 22:40 
Questionproblem with capturing images through webcam in win7 Pin
prasadbuddhika21-Jan-11 16:29
prasadbuddhika21-Jan-11 16:29 
AnswerRe: problem with capturing images through webcam in win7 Pin
Luc Pattyn21-Jan-11 17:13
sitebuilderLuc Pattyn21-Jan-11 17:13 
QuestionMDI form with contents? Pin
patr1c1a21-Jan-11 5:34
patr1c1a21-Jan-11 5:34 
AnswerRe: MDI form with contents? Pin
Dave Kreskowiak21-Jan-11 7:02
mveDave Kreskowiak21-Jan-11 7:02 
GeneralRe: MDI form with contents? [modified] Pin
patr1c1a21-Jan-11 7:52
patr1c1a21-Jan-11 7:52 
GeneralRe: MDI form with contents? Pin
Dave Kreskowiak21-Jan-11 10:29
mveDave Kreskowiak21-Jan-11 10:29 
AnswerRe: MDI form with contents? Pin
KarlRhodes24-Jan-11 6:22
KarlRhodes24-Jan-11 6:22 
QuestionCopying DropDownItems from one ToolStripDropDownItem to another Pin
Dewald21-Jan-11 2:24
Dewald21-Jan-11 2:24 
AnswerRe: Copying DropDownItems from one ToolStripDropDownItem to another Pin
musefan21-Jan-11 2:38
musefan21-Jan-11 2:38 
GeneralRe: Copying DropDownItems from one ToolStripDropDownItem to another Pin
Dewald21-Jan-11 3:10
Dewald21-Jan-11 3:10 
GeneralRe: Copying DropDownItems from one ToolStripDropDownItem to another Pin
musefan21-Jan-11 3:19
musefan21-Jan-11 3:19 
GeneralRe: Copying DropDownItems from one ToolStripDropDownItem to another Pin
musefan21-Jan-11 4:00
musefan21-Jan-11 4:00 
QuestionProblem to implement designer at runTime. Pin
hdv21221-Jan-11 2:15
hdv21221-Jan-11 2:15 
AnswerRe: Problem to implement designer at runTime. Pin
Richard MacCutchan21-Jan-11 2:52
mveRichard MacCutchan21-Jan-11 2:52 
GeneralRe: Problem to implement designer at runTime. Pin
hdv21221-Jan-11 5:32
hdv21221-Jan-11 5:32 
GeneralRe: Problem to implement designer at runTime. Pin
Richard MacCutchan21-Jan-11 6:28
mveRichard MacCutchan21-Jan-11 6:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.