[파워빌더] gethostname 이 작동안될때...
----------------------------------------------------------
Function uint gethostname (ref String szHost, long dwHostLen) Library "wsock32.dll" alias for "gethostname;Ansi"
FUNCTION boolean GetUserNameA(ref string uname, ref ulong slength) LIBRARY "ADVAPI32.DLL" Alias For "GetUserNameA;Ansi"
Function boolean GetComputerNameA (ref string lpBuffer, ref ulong nSize) Library "kernel32.dll" Alias For "GetComputerNameA;Ansi"
--------------------------------------------------------------
String ls_HostName
ls_HostName = space(128)
this.gethostname ( ls_HostName, len(ls_HostName) )
ls_HostName = this.n2b(ls_HostName)
if ls_HostName = "" then
ulong lu_val
lu_val = 255
ls_HostName = Space( 255 )
GetComputerNameA (ls_HostName, lu_val)
end if
ls_HostName = trim(ls_HostName)
Messagebox("", ls_HostName)
Return ls_HostName
Function uint gethostname (ref String szHost, long dwHostLen) Library "wsock32.dll" alias for "gethostname;Ansi"
FUNCTION boolean GetUserNameA(ref string uname, ref ulong slength) LIBRARY "ADVAPI32.DLL" Alias For "GetUserNameA;Ansi"
Function boolean GetComputerNameA (ref string lpBuffer, ref ulong nSize) Library "kernel32.dll" Alias For "GetComputerNameA;Ansi"
--------------------------------------------------------------
String ls_HostName
ls_HostName = space(128)
this.gethostname ( ls_HostName, len(ls_HostName) )
ls_HostName = this.n2b(ls_HostName)
if ls_HostName = "" then
ulong lu_val
lu_val = 255
ls_HostName = Space( 255 )
GetComputerNameA (ls_HostName, lu_val)
end if
ls_HostName = trim(ls_HostName)
Messagebox("", ls_HostName)
Return ls_HostName