"int lpdwSize" should be "ref uint lpdwSize"
Thanks! That at least stopped the native exception I was getting.
However, the function now returns ERROR_NOINTERFACE. Is the function definition still wrong?
[DllImport("coredll.dll")] private extern static uint RasGetEntryProperties(string lpszPhoneBook, string szEntry, ref RASENTRY lpbEntry, ref uint lpdwEntrySize, byte lpb, ref uint lpdwSize);