_ns1__FileUpload request; request.fileNameGuid = &std::string(fileName.GetBuffer(0)); CFile cfile; cfile.Open(fileName,CFile::modeRead|CFile::typeBinary); int dwLo=(int)cfile.GetLength(); BYTE *pss=new BYTE[dwLo]; ZeroMemory(pss,dwLo); cfile.Read(pss,dwLo); xsd__base64Binary photo; photo.__ptr=new BYTE[dwLo]; memcpy(photo.__ptr,pss,dwLo); request.data = &photo; cfile.Close();