wchar_t *dll = new wchar_t[textBoxDLLName->Text->Length + 1]; int i; for(i = 0; i < textBoxDLLName->Text->Length; i++) { dll[i] = textBoxDLLName->Text[0]; } dll[i] = 0;