From: Wael on
my applicatin use getcurrentdirectoryA for ANSI it work good in winxp but in
win7 the function get other directory not application directory. i need to
use API functions cuz i'm using powerbuilder. please help tp fix this problem.

if it's wrong GN please let me Know where i can add this.

note:- Windows API NG not working with me
From: Kaidong on

"Wael" <Wael(a)discussions.microsoft.com> 写入消息
news:03843315-5788-4F5F-A893-F8C02882A21A(a)microsoft.com...
> my applicatin use getcurrentdirectoryA for ANSI it work good in winxp but
> in
> win7 the function get other directory not application directory. i need to
> use API functions cuz i'm using powerbuilder. please help tp fix this
> problem.
>
> if it's wrong GN please let me Know where i can add this.
>
> note:- Windows API NG not working with me

Windows Vista/7 had been "rebuilded" the system architecture, some API maybe
removed for ANSI version, why not use "getcurrentdirectory" instead of
"getcurrentdirectoryA", or more convenient, you can use "app.path" instead
of the API "getcurrentdirectory". "app" is a application object in VB6
runtime that you could use it easily.

From: Karl E. Peterson on
Wael was thinking very hard :
> my applicatin use getcurrentdirectoryA for ANSI it work good in winxp but in
> win7 the function get other directory not application directory. i need to
> use API functions cuz i'm using powerbuilder. please help tp fix this
> problem.

I think you're operating under a misconception. The current directory
is a very different thing from the application directory. If you need
to know where your application is, you can use GetModuleFileName to
retrieve the fully-qualified path to your executable. Just pass NULL
as the hModule parameter.

> if it's wrong GN please let me Know where i can add this.
>
> note:- Windows API NG not working with me

The Microsoft news server is being shutdown. Get yourself an account
at another usenet provider. I'm recommending www.eternal-september.org
as one of the best available right now. The Windows API group(s) are
still fully functional on their server.

--
..NET: It's About Trust!
http://vfred.mvps.org


From: Randem on
You may have a misinterpetation of the current directory. It depens on when
you call the API. Don't assume that the current directory is anywhere
because any application can change the current directory if you are calling
it from within your application. This would be called the Working directory
where the application does it's work. If you call the GetCurrentDirectory
API just after such an operation then the current directory will be the
working directory of the last program you called. Use App.Path to find the
application directory for the current directory could be something else.

--
The Top Inno Setup Script Generator - http://www.randem.com/innoscript.html
Free Utilities and Code - http://www.randem.com/freesoftutil.html