Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. how can i specify the path

how can i specify the path

Scheduled Pinned Locked Moved C / C++ / MFC
question
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    santhosh padamatinti
    wrote on last edited by
    #1

    Hi, I am copying attachments into my PC. Where i am using IStream, this one directly saving attachments but those attachments are saved in only office 12 folder, how i can change the path. code is: LPSTREAM pStrmSrc = NULL, pStrmDest = NULL; STATSTG StatInfo; if (FAILED(hRes = lpAttach->OpenProperty(PR_ATTACH_DATA_BIN, (LPIID)&IID_IStream,0,MAPI_MODIFY,(LPUNKNOWN *)&pStrmSrc))) break; if (FAILED(hRes = OpenStreamOnFile(MAPIAllocateBuffer, MAPIFreeBuffer,STGM_CREATE | STGM_READWRITE, pRows->aRow[i].lpProps[0].Value.lpszA, NULL,&pStrmDest))) break; where pstrmsrc is source destination, pstrmdest is copying destination. how can i specify my path in this thanx in advance

    sampath-padamatinti

    M C M 3 Replies Last reply
    0
    • S santhosh padamatinti

      Hi, I am copying attachments into my PC. Where i am using IStream, this one directly saving attachments but those attachments are saved in only office 12 folder, how i can change the path. code is: LPSTREAM pStrmSrc = NULL, pStrmDest = NULL; STATSTG StatInfo; if (FAILED(hRes = lpAttach->OpenProperty(PR_ATTACH_DATA_BIN, (LPIID)&IID_IStream,0,MAPI_MODIFY,(LPUNKNOWN *)&pStrmSrc))) break; if (FAILED(hRes = OpenStreamOnFile(MAPIAllocateBuffer, MAPIFreeBuffer,STGM_CREATE | STGM_READWRITE, pRows->aRow[i].lpProps[0].Value.lpszA, NULL,&pStrmDest))) break; where pstrmsrc is source destination, pstrmdest is copying destination. how can i specify my path in this thanx in advance

      sampath-padamatinti

      M Offline
      M Offline
      Madhu Nair 0
      wrote on last edited by
      #2

      The MSDN documentation of OpenStreamOnFile[^] gives a code sample, please find it in your MSDN folder, or click on this link to see it

      1 Reply Last reply
      0
      • S santhosh padamatinti

        Hi, I am copying attachments into my PC. Where i am using IStream, this one directly saving attachments but those attachments are saved in only office 12 folder, how i can change the path. code is: LPSTREAM pStrmSrc = NULL, pStrmDest = NULL; STATSTG StatInfo; if (FAILED(hRes = lpAttach->OpenProperty(PR_ATTACH_DATA_BIN, (LPIID)&IID_IStream,0,MAPI_MODIFY,(LPUNKNOWN *)&pStrmSrc))) break; if (FAILED(hRes = OpenStreamOnFile(MAPIAllocateBuffer, MAPIFreeBuffer,STGM_CREATE | STGM_READWRITE, pRows->aRow[i].lpProps[0].Value.lpszA, NULL,&pStrmDest))) break; where pstrmsrc is source destination, pstrmdest is copying destination. how can i specify my path in this thanx in advance

        sampath-padamatinti

        C Offline
        C Offline
        Chandrasekharan P
        wrote on last edited by
        #3

        Re-posting is not required here. Please delete your first post.

        1 Reply Last reply
        0
        • S santhosh padamatinti

          Hi, I am copying attachments into my PC. Where i am using IStream, this one directly saving attachments but those attachments are saved in only office 12 folder, how i can change the path. code is: LPSTREAM pStrmSrc = NULL, pStrmDest = NULL; STATSTG StatInfo; if (FAILED(hRes = lpAttach->OpenProperty(PR_ATTACH_DATA_BIN, (LPIID)&IID_IStream,0,MAPI_MODIFY,(LPUNKNOWN *)&pStrmSrc))) break; if (FAILED(hRes = OpenStreamOnFile(MAPIAllocateBuffer, MAPIFreeBuffer,STGM_CREATE | STGM_READWRITE, pRows->aRow[i].lpProps[0].Value.lpszA, NULL,&pStrmDest))) break; where pstrmsrc is source destination, pstrmdest is copying destination. how can i specify my path in this thanx in advance

          sampath-padamatinti

          M Offline
          M Offline
          Michael Haephrati
          wrote on last edited by
          #4

          Here is the solution in details: There is a discrepancy with the actual function and the header file. That's Microsoft's mistake which due to be fixed. 1. Go to MAPIUtil.h where OpenStreamOnFile is declared. Change __in LPCTSTR lpszFileName, to __in_opt LPCSTR lpszPrefix, 2. Use ASCII file name when calling OpenStreamOnFile

          - Michael Haephrati מיכאל האפרתי

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups