Windows API Calls for Powerbuilder 5.0

¹®Á¦

CopyFileA( )

ÇØ°á

This function copies a file by taking the source and destination names as a string by reference. If the flag is set to true the file will not overwrite an existing file, if set to false it will overwrite an existing file. There is no Powerbuilder equivalent.

Global External Function:
FUNCTION boolean CopyFileA(ref string cfrom, ref string cto, boolean flag) LIBRARY &
                                          "Kernel32.dll"

Script:
string l_from, l_to
boolean l_flag, rtn
l_flag = false
l_from = "c:\pwrs\pb5i32\ex\code\beach.bmp"
l_to = "c:\test.bmp"
vtn = CopyFileA(l_from, l_to, l_flag)
MessageBox("CopyFile", string(rtn))

 

ÂüÁ¶