This project is read-only.

RASPhoneBookDialog - EntryName property value

Mar 7, 2011 at 2:38 PM

Hi, Jeff

I would like to know if it is normal to get a null value in the EntryName property  once DialedEntry event has been reached


Mar 7, 2011 at 10:26 PM

The only time the EntryName property is set back to null is when the Reset method is called. Other than that, nothing else sets the property.

Mar 8, 2011 at 8:35 AM

This property doesn't seem to be updated when another entry in the PBK is selected via the RASPhoneBookDialog combobox. In my opinion it should: the user is presented with a combobox in order to choose an entry in the PBK to be dialed; but his choice is not available once the selected entry has been dialed . Am I getting it wrong ?

Mar 8, 2011 at 6:35 PM
Edited Mar 8, 2011 at 6:36 PM

Unfortunately the Win32 API that the dialog consumes doesn't allow for that data to be returned to the DotRas API. As indicated in the RasPhoneBookDlg API and the intellisense for EntryName, it is only there to select the initial item, nothing else. Here's an excerpt from the Win32 SDK page for the API that it consumes:

lpszEntry [in] 
Pointer to a null-terminated string that specifies the name of the phone-book entry to highlight initially. If this parameter is NULL, or 
if the specified entry does not exist, the dialog box highlights the first entry in the alphabetic list.


 I can't force the API to do something it wasn't designed to do when it's outside of my control.


Edit: Just some formatting changes.

Mar 9, 2011 at 2:30 PM

Actually, I did a bit more digging and it looks like I can do some stuff with the event that will indicate which entry was dialed after looking at the callback function. Going to add a work item so I can expose the data.

Mar 9, 2011 at 2:35 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Mar 10, 2011 at 8:21 AM

Jeff, thank you very much for your quick responses. It would be great if you could do something to expose EntryName property value. 

Mar 10, 2011 at 2:16 PM

It'll be in the next release, I checked it in last night. The events that were raised by the component originally only contained an empty EventArgs instance. All I did was create a RasPhoneBookDialogEventArgs class and pass the data from the callback to the event so that you can see what the Win32 API reported had happened in the dialog.