Doesn't the
+=
operator work?
string s = "SELECT UserName,Password,Uid FROM HLDS where UserName='";
s += this->textbox1->text;
s += "'";
hres = pSvc->ExecQuery(
bstr_t("WQL"),
bstr_t(s),
WBEM_FLAG_FORWARD_ONLY | WBEM_FLAG_RETURN_IMMEDIATELY,
NULL,
&pEnumerator);