Open PhoneBook never returns to execution

Jun 19, 2014 at 1:36 PM

I'm using DotRas for a small VPN application and experienced a strage problem: Sometimes when I call RasPhoneBook.Open, a sort of "deadlock" is produced and the whole application hangs. When i debug over this line, the debugger simply never returns to the next instruction.
Opening the PBK-File via windows explorer in this case also fails, the connection manager never shows up.

Could it be possible that a reference/handle to the phonebook blocks the whole file, preventing it from opening? Or that a save/write process produces this behaviour?

Thanks for any suggestions!
Jun 20, 2014 at 8:26 PM
Since DotRas uses the same APIs as what Windows does it doesn't surprise me at all that both DotRas and Windows hangs on the same phonebook. Sounds like its corrupted to me.
Jun 22, 2014 at 9:34 PM
Thanks for the answer. Did you experiece any similar problems in the past and know what can cause a currupted file?
The VPN application saves the pbk File after each modification. Can such a frequent overwrite lead to problems?
Jul 7, 2014 at 2:13 PM
If I remembering correctly, a few years ago (maybe 4 or so now) we experienced it once. Some cellular modems were (in the configuration they were set to) rewriting phonebook entries as they woke from sleep or something of that character, and wrongly to boot. We were able to get the carrier to tell us how to reconfigure them so this didn't happen at all, since we needed dynamic configuration anyway and rewrites would be a problem with that. (Our RAS software is a semireplacement for, and is not compatible with, carrier/vendor supplied connection manager software.)