how can i specify the path
-
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
-
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
The MSDN documentation of OpenStreamOnFile[^] gives a code sample, please find it in your MSDN folder, or click on this link to see it
-
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
Re-posting is not required here. Please delete your first post.
-
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
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 מיכאל האפרתי