CPB Mailing List

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

What's wrong with my codes?



I tried the following codes and get a bunch of error messages.  I can see that the error is in the use of strings, but why?
 
String pwlfile;
pwlfile = WinDir+name+".pwl";
 
String dllfile;
dllfile = WinDir+"OCX255"+name+".dll";
 
CopyFile(pwlfile,dllfile);
 
WinDir and name are declared before this block of codes, and I checked they are working correctly. I also use a messagebox to display the strings dllfile and pwlfile and they came out perfectly.
 
Here are the error messages...
[C++Error] traymain.cpp(272): Cannot convert 'System::AnsiString' to 'const char *'.
[C++Error] traymain.cpp(272): Type mismatch in parameter 'lpExistingFileName' in call to '__stdcall CopyFileA(const char *,const char *,int)'.
[C++Error] traymain.cpp(272): Cannot convert 'System::AnsiString' to 'const char *'.
[C++Error] traymain.cpp(272): Type mismatch in parameter 'lpNewFileName' in call to '__stdcall CopyFileA(const char *,const char *,int)'.
[C++Error] traymain.cpp(272): Too few parameters in call to '__stdcall CopyFileA(const char *,const char *,int)'.
thanks

Steven Carlson
President of High Voltage R&D
http://www.highvoltagerd.com
 
-==- Are you looking for a Windows 95 Security System?-==-
Check out High Security at
http://www.highvoltagerd.com/HighSecurity/
 
 

W Komornicki's Home Page | Main Index | Thread Index