logDebug ( "streamOnFile %s succeeded\r\n", file);
logDebug ( "streamOnFile %s succeeded\n", file);
MapiGPGMEImpl::streamOnFile (const char *file, LPATTACH att){    HRESULT hr;    LPSTREAM from = NULL, to = NULL;    STATSTG statInfo;    hr = att->OpenProperty (PR_ATTACH_DATA_BIN, &IID_IStream, 			    0, 0, (LPUNKNOWN*) &from);    if (FAILED (hr))	return FALSE;    hr = OpenStreamOnFile (MAPIAllocateBuffer, MAPIFreeBuffer,   		           STGM_CREATE | STGM_READWRITE, (char*) file,			   NULL, &to);    if (!SUCCEEDED (hr)) {	from->Release ();	logDebug ( "streamOnFile %s failed with %s\r\n", file, 		    hr == MAPI_E_NO_ACCESS? 		    "no access" : hr == MAPI_E_NOT_FOUND? "not found" : "unknown");	return FALSE;    }    from->Stat (&statInfo, STATFLAG_NONAME);    from->CopyTo (to, statInfo.cbSize, NULL, NULL);    to->Commit (0);    to->Release ();    from->Release ();    logDebug ( "streamOnFile %s succeeded\r\n", file);    return TRUE;}