I'm assuming that the following line is line 272: CopyFile(pwlfile,dllfile); It should be: CopyFile(pwlfile.c_str(),dllfile.c_str()); All the error are caused by the single problem that you are passing an AnsiString to an API function that expects char*. Travis Bauer