logDebug ("set X-Header succeeded.\r\n");
logDebug ("set X-Header succeeded.\n");
MapiGPGMEImpl::setXHeader (const char *name, const char *val){  #ifndef __MINGW32__    USES_CONVERSION;#endif    LPMDB lpMdb = NULL;    HRESULT hr = 0;    LPSPropTagArray pProps = NULL;    SPropValue pv;    MAPINAMEID mnid[1];	    // {00020386-0000-0000-C000-000000000046}  ->  GUID For X-Headers	    GUID guid = {0x00020386, 0x0000, 0x0000, {0xC0, 0x00, 0x00, 0x00,		 0x00, 0x00, 0x00, 0x46} };    memset (&mnid[0], 0, sizeof (MAPINAMEID));    mnid[0].lpguid = &guid;    mnid[0].ulKind = MNID_STRING;//     mnid[0].Kind.lpwstrName = A2W (name);    hr = msg->GetIDsFromNames (1, (LPMAPINAMEID*)mnid, MAPI_CREATE, &pProps);    if (FAILED (hr)) {	logDebug ("set X-Header failed.\r\n");	return false;    }        pv.ulPropTag = (pProps->aulPropTag[0] & 0xFFFF0000) | PT_STRING8;    pv.Value.lpszA = (char *)val;    hr = HrSetOneProp(msg, &pv);	    if (!SUCCEEDED (hr)) {	logDebug ("set X-Header failed.\r\n");	return false;    }    logDebug ("set X-Header succeeded.\r\n");    return true;}