# Re: 查一下

Posted by Eric Tseng on January 16, 1999 at 21:35:53:

In Reply to: Re: 查一下 posted by cww on January 15, 1999 at 16:25:11:

: 嗯，我的WIN32.HLP没有GetLongPathName
: : 另GetFullPathName()的功能不应该是只要传入档名，
: : 即可取得路径?为何传入任何档名，皆传回
: : "C:\MY DOCUMENTS"?
: 不会啊，至少我testing就不会这样子

我在Microsoft vb newsgroup 上也提出同样问题,得到下面的答覆,谨供参考!
GetFullPathName simply expands a file name relative to the current drive and
directory . It doesn't check if the file name is valid or if the file
exists. E.g if your current directory is c:\my documents then if you supply
a file name of 'afile.ext' then you'll get a return value of 'c:\my
documents\afile.ext'. If you supply '..\afile.ext' (where '..' means go up 1
level) you'll get a return value of 'c:\afile.ext'. If, however, you give a
fully expanded file name then you'll get the same name returned e.g.
'c:\afile.ext' will return 'c:\afile.ext'

另外再请教一个问题,要如何以VB程式背景侦测全域视窗的讯息?例如AUTO SHUTDOWN
如何侦测MOUSE,KEYBOARD及modem有无动作?Subclassing只能拦截送至自己程式视窗的
讯息,而如果要拦截所有讯息(不论是否送给自己),如何能不影响其他程式之执行?

Follow Ups: