Windows API Calls for Powerbuilder 5.0

¹®Á¦

GetCurrentDirectoryA( )

ÇØ°á

This function returns the current working directory into a string by reference. Be sure to allocate enough space for the string or you'll get a GPF when you exit Powerbuilder. There is no Powerbuilder equivalent.

Global External Function:
FUNCTION ulong GetCurrentDirectoryA(ulong BufferLen, ref string currentdir) LIBRARY &
                                                                                                           "Kernel32.dll"
Script:
string ls_curdir
ulong l_buf
l_buf = 100
ls_curdir = space(l_buf)
GetCurrentDirectoryA(l_buf, ls_curdir)
MessageBox("Current Directory:", ls_curdir)

 

ÂüÁ¶