However, I am still just as confused and still stuck. The code I have been given is that in my original posting. I have an Outlook object, because this code is not falling over, but I can create a mail item for a template.
I believe your problem is with the last parameter to "CreateItemFromTemplate". NULL is not the correct way to pass an [in, optional] VARIANT. There is no need to convert filePath to a BSTR, presuming that "outlookApp" is indeed an COleDispatchDriver. Do cast it to an LPCTSTR, InvokeHelper expects an in param defined as a VTS_BSTR to be an LPCTSTR, MFC's implementation of COleDispathDrvier will do the BSTR conversion for you inside the InvokeHelper call.
Because I do not have a folder for the email to be created in and wish to use the default folder inside Outlook, what parameter should I use, or should I only pass in the parameters I am using and Outlook can then interpret this?
i am trying to encrypting the existing file and folder using the zip archive lib.
here is the code
but i want to do 1234.txt itself an zip file or directory ie existing not by adding the file or folder to a zip file .......
i studied encrypt file method i did't understood the code which they mention in the help file how to use it ..
is there any other way to encrypt it using the zip archive lib
plz help me out this
how to use it this function CZipArchive::EncryptFile()in MFC in ZIP archive lib they have mention that this function is used encrypt the existing file.i am not able to understand the what parameter does it take uindex means please make it clear with example code ......
Your assignment looks valid. How did you test that aa does not hold the correct value? If you checked in the debugger, or pass it to cout, please remember that the type is still a character, and the standard representation is as a character. The value 10 is a non-prinitable character, and as such would show no visible output either in the debugger or in a printout, unless you convert aa to int first.