15 мая 2023 года "Исходники.РУ" отмечают своё 23-летие!
Поздравляем всех причастных и неравнодушных с этим событием!
И огромное спасибо всем, кто был и остаётся с нами все эти годы!

Главная Форум Журнал Wiki DRKB Discuz!ML Помощь проекту


Capturing Phonebook Entry's Name

Ashleigh Low -- alow@direct.ca
Wednesday, March 05, 1997

Environment: VC++ 4.2b, Win 95, NT 4.0

Hi,

I have an application which calls the RAS APIs RasCreatePhonebookEntry() &
RasEditPhonebookEntry() to allow creation or editing of Phonebook entry. 
However, I need to capture the entry's name which has been entered through
the dialog box displayed by the these functions which don't return anything
other than just a DWORD.

Is there a get-around solution to this?

Ashleigh





Mike Blaszczak -- mikeblas@nwlink.com
Thursday, March 06, 1997

[Mini-digest: 3 responses]

At 19:53 3/5/97 -0800, Ashleigh Low wrote:
>Environment: VC++ 4.2b, Win 95, NT 4.0

>I have an application which calls the RAS APIs RasCreatePhonebookEntry() &
>RasEditPhonebookEntry() to allow creation or editing of Phonebook entry. 

This has absolutely nothing to do with MFC.  Why are you asking it here?

>However, I need to capture the entry's name which has been entered through
>the dialog box displayed by the these functions which don't return anything
>other than just a DWORD.

Under Windows NT 4.0 ,you should call RasEntryDlg() directly, as
RasCreatePhonebookEntry() and RasEditPhonebookEntry() are obsolete.

Under Windows 95, I'm afraid you'll have to enumerate the registry before
and after and compare them to see what's different.


.B ekiM
http://www.nwlink.com/~mikeblas/
These words are my own. I do not speak on behalf of Microsoft.
           This performance was not lip-synched.

-----From: Christophe Nasarre  

Ashleigh wrote:

> Environment: VC++ 4.2b, Win 95, NT 4.0
> 
> Hi,
> 
> I have an application which calls the RAS APIs RasCreatePhonebookEntry() &
> RasEditPhonebookEntry() to allow creation or editing of Phonebook entry.
> However, I need to capture the entry's name which has been entered through
> the dialog box displayed by the these functions which don't return anything
> other than just a DWORD.
> 
> Is there a get-around solution to this?

One easy solution is to fill a list with the existing entries using RasEnumEntries()
BEFORE calling RasCreatePhonebookEntry() or RasEditPhonebookEntry() and compare
it with another enumeration done AFTER the call.

If you want to spend more time to dig inside RAS API, you should take a look
at RasEntryDlg() which is used internaly by RasCreatePhonebookEntry() and
RasEditPhonebookEntry() (dixit the documentation)


Good luck

   Christophe


-----From: Shane Triem 


I had the same requirement and the way I implemented was to enumerate all   
the phone book entries before the call and then again after.  There is of   
couse a potencial that the user could switch from your application to   
Dial-Up-Networking right after your call to create/edit, create a phone   
book entry and then return to your application making it appear that two   
or more entries were added since your first call to create/edit.  You'll   
have to decide the likelyhood of this occurance and how to handle it.

Shane Triem
STEP Technology,
Portland, OR
shane@steptech.com

 ----------
From:  Ashleigh Low
Sent:  Friday, March 07, 1997 12:07 AM
To:  SHANE; 'MFC-L@SMTP '
Subject:  Capturing Phonebook Entry's Name

Environment: VC++ 4.2b, Win 95, NT 4.0

Hi,

I have an application which calls the RAS APIs RasCreatePhonebookEntry()   
&
RasEditPhonebookEntry() to allow creation or editing of Phonebook entry.
However, I need to capture the entry's name which has been entered   
through
the dialog box displayed by the these functions which don't return   
anything
other than just a DWORD.

Is there a get-around solution to this?

Ashleigh







Become an MFC-L member | Вернуться в корень Архива |