| 赞 | 0 |
| VIP | |
| 好人卡 | |
| 积分 | 3 |
| 经验 | |
| 最后登录 | 2019-10-13 |
| 在线时间 | 953 小时 |
- 梦石
- 0
- 星屑
- 310
- 在线时间
- 953 小时
- 注册时间
- 2007-4-25
- 回帖
- 798
|
发表于 2011-9-18 23:48:18
|
显示全部楼层
- require 'win32api'
- get_temp_path = Win32API.new('kernel32', 'GetTempPath', 'lp', 'l')
- temp_path = ' ' * 256
- get_temp_path.call(256, temp_path)
- p temp_path.strip
复制代码 如果路径中包含多字节字符则须用 GetTempPathW。 |
|