RASPhoneBookDialog - EntryName property value

Mar 7, 2011 at 1: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

Thanks

Coordinator
Mar 7, 2011 at 9: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 7: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 ?

Coordinator
Mar 8, 2011 at 5:35 PM
Edited Mar 8, 2011 at 5: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.

Source:
http://msdn.microsoft.com/en-us/library/aa377612(v=vs.85).aspx

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

Sorry.

Edit: Just some formatting changes.

Coordinator
Mar 9, 2011 at 1: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.

Coordinator
Mar 9, 2011 at 1: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 7: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. 

Coordinator
Mar 10, 2011 at 1: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.