精华区 [关闭][返回]

当前位置:网易精华区>>讨论区精华>>编程开发>>● Powerbuilder>>使用API>>如何获得"windows"目录的路径

主题:如何获得"windows"目录的路径
发信人: meichaol()
整理人: leitiger(2002-06-05 23:49:05), 站内信件
【 在 musea (macro) 的大作中提到: 】
:     本人在用pb6.5编写程序需要得到"windows"目录的路径,
: 不知如何处理希望各路大侠不吝赐教。
:    谢谢

:    .......

定义全局函数:
FUNCTION ulong GetWindowsDirectoryA(ref string wdir, ulong buf) LIBRAR
Y "kernel32.dll" 

代码如下:
ulong buf 
string windowdir 
buf = 255 
windowdir = space(255) 
GetWindowsDirectoryA(windowdir, buf) 
MessageBox("window目录", windowdir)


good lucky

--
※ 来源:.月光软件站 http://www.moon-soft.com.[FROM: 210.72.229.88]

[关闭][返回]