Dial-up-ing from a service...

I have a strange problem using dial-up in my program…
It runs as a service (system account) under WinNT & 2000.

I use RasGetCredentials to get username/password/domain data for a specified
phonebook entry:

RasGetCredentials(SYSTEM_PHONEBOOK, szPhoneBookEntry, &rasCredentials);

SYSTEM_PHONEBOOK is a #defined path to the system phonebook (hardcoded for
testing purposes :slight_smile:

Now, the strange thing… If I run the program as a “normal” app (under my
acc, admin) it runs fine. If I start it as a service, RasGetCredentials
returns no error, but username and password fields are empty!

Another quick question… How do I access system phonebook under Win2000?

Any help would be greatly appreciated…

Marko
ICQ: 5990814

Brooke’s Law:
Whenever a system becomes completely defined,
some damn fool discovers something
which either abolishes the system or expands it beyond recognition.

Marko Bozikovic wrote:

I have a strange problem using dial-up in my program…
It runs as a service (system account) under WinNT & 2000.
-snip-

Never mind… Got it… :slight_smile:

Marko
ICQ: 5990814

Brooke’s Law:
Whenever a system becomes completely defined,
some damn fool discovers something
which either abolishes the system or expands it beyond recognition.

Try impersonating some user before calling RAS API. This should help, at
least it helped me when I called other than RasGetCredentials(…) RAS API
functions.

serge

-----Original Message-----
From: Marko Bozikovic [mailto:xxxxx@fly.srk.fer.hr]
Sent: Monday, April 10, 2000 10:39 PM
To: NT Developers Interest List
Subject: [ntdev] Dial-up-ing from a service…

I have a strange problem using dial-up in my program…
It runs as a service (system account) under WinNT & 2000.

I use RasGetCredentials to get username/password/domain data for a specified
phonebook entry:

RasGetCredentials(SYSTEM_PHONEBOOK, szPhoneBookEntry, &rasCredentials);

SYSTEM_PHONEBOOK is a #defined path to the system phonebook (hardcoded for
testing purposes :slight_smile:

Now, the strange thing… If I run the program as a “normal” app (under my
acc, admin) it runs fine. If I start it as a service, RasGetCredentials
returns no error, but username and password fields are empty!

Another quick question… How do I access system phonebook under Win2000?

Any help would be greatly appreciated…

Marko
ICQ: 5990814

Brooke’s Law:
Whenever a system becomes completely defined,
some damn fool discovers something
which either abolishes the system or expands it beyond recognition.


You are currently subscribed to ntdev as: xxxxx@stac.ee
To unsubscribe send a blank email to $subst(‘Email.Unsub’)