沙漠之鹰
驱动大牛
驱动大牛
  • 注册日期2001-12-30
  • 最后登录2007-08-02
  • 粉丝0
  • 关注0
  • 积分16分
  • 威望2点
  • 贡献值0点
  • 好评度1点
  • 原创分0分
  • 专家分0分
阅读:987回复:5

请各位网友赶快帮帮我,我都快急死了!!1

楼主#
更多 发布于:2002-06-16 13:21
我现在想在程序中获得该程序的完整路径,不知道该如何做,哪位在虾能告诉我真是感激不尽,十万火急!!!非常感谢!!!完事之后一定给分!!!




[编辑 -  6/16/02 by  wwx79]
------------------------------ [color=red]茶壶深爱着茶叶,表达爱意时却遭到拒绝,茶壶大吼:为什么?这一切都是为什么? 茶叶胆怯地说:俺妈说了,成天灌水的都不是好人。 ---别到处看,说你哪!!    [/color]
gxjt
驱动老牛
驱动老牛
  • 注册日期2002-03-26
  • 最后登录2006-06-07
  • 粉丝0
  • 关注0
  • 积分9分
  • 威望2点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
沙发#
发布于:2002-07-13 12:55
GetCurrentDirectory()不知行不行

答的好请给点分
[color=red] “阿弥陀佛,无上医王,舍此不求,是谓痴狂。” “一句弥陀,阿伽陀药,舍此不服,是谓大错。” 南无阿弥陀佛......[/color]
Hideman
驱动中牛
驱动中牛
  • 注册日期2001-09-11
  • 最后登录2007-04-16
  • 粉丝0
  • 关注0
  • 积分70分
  • 威望7点
  • 贡献值0点
  • 好评度7点
  • 原创分0分
  • 专家分0分
板凳#
发布于:2002-07-13 15:54
GetModuleFileName
Hideman
驱动中牛
驱动中牛
  • 注册日期2001-09-11
  • 最后登录2007-04-16
  • 粉丝0
  • 关注0
  • 积分70分
  • 威望7点
  • 贡献值0点
  • 好评度7点
  • 原创分0分
  • 专家分0分
地板#
发布于:2002-07-13 15:54
GetModuleFileName (AfxGetInstanceHandle(), szAppPath, _MAX_PATH);
guardee
驱动巨牛
驱动巨牛
  • 注册日期2002-11-08
  • 最后登录2010-05-29
  • 粉丝2
  • 关注1
  • 积分2分
  • 威望34点
  • 贡献值0点
  • 好评度6点
  • 原创分0分
  • 专家分0分
地下室#
发布于:2002-07-15 10:14
在SDK的帮助里面有啊!可以用GetStartupInfo(),或者是
GetModuleFileNameEx
The GetModuleFileNameEx function retrieves the fully qualified path for the specified module.

DWORD GetModuleFileNameEx(
  HANDLE hProcess,    // handle to the process
  HMODULE hModule,    // handle to the module
  LPTSTR lpFilename,  // buffer that receives the path
  DWORD nSize         // maximum number of characters to retrieve
);
Parameters
hProcess
Handle to the process that contains the module.
hModule
Handle to the module.
lpFilename
Pointer to the buffer that receives the fully qualified path to the module. If the filename is longer than maximum number of characters specified by the nSize parameter, the filename is truncated.
nSize
Specifies the maximum number of characters to copy to the lpFilename buffer.
Return Value
If the function succeeds, the return value specifies the length of the string copied to the buffer.

If the function fails, the return value is zero. To get extended error information, call GetLastError.

Requirements
  Windows NT/2000: Requires Windows NT 4.0 or later.
  Windows 95/98: Unsupported.
  Windows CE: Unsupported.
  Header: Declared in psapi.h.
  Import Library: Use psapi.lib.
  Unicode: Implemented as Unicode and ANSI versions on Windows NT/2000.

linfeng1216
驱动小牛
驱动小牛
  • 注册日期2004-03-10
  • 最后登录2008-12-31
  • 粉丝0
  • 关注0
  • 积分818分
  • 威望89点
  • 贡献值0点
  • 好评度74点
  • 原创分0分
  • 专家分0分
5楼#
发布于:2004-05-28 10:11
你想问的不是楼上各位说的吧!看看这个
http://www.driverdevelop.com/forum/viewthread.php?tid=56561
这件事很难
游客

返回顶部