I need a PPP connection thru a COM port.
Going thru the New Connection Wizard and selecting
a COM port, XP installs a new modem "Communications cable
between two computers" which is then used by a new
"Direct" RAS connection.
Setting up the RAS connection was easy by means
of RasSetEntryProperties.
But how to install the "Communications cable
between two computers" modem without user interaction?
I've found an answer in the InstallFAQ.doc document, under
"What is a root-enumerated driver and how do I install one
programmatically?"
http://www.microsoft.com/whdc/driver...nstallfaq.mspx
I have done a told there:
1. Call SetupDiCreateDeviceInfoList to create an HDEVINFO handle.
2. Call SetupDiCreateDeviceInfo with the ClassGuid of the devnode you
want to create to create a SP_DEVINFO_DATA.
3. Call SetupDiSetDeviceRegistryProperty with SPDRP_HARDWAREID on
the HDEVINFO and SP_DEVINFO_DATA to give your device a
hardware ID.
4. Call SetupDiCallClassInstaller with DIF_REGISTERDEVICE to register
your device.
5. Call UpdateDriverForPlugAndPlayDevices with the INF containing the
driver for the device and the hardware ID used in step 3 to install
drivers on the devnode.
UpdateDriverForPlugAndPlayDevices fails with ERROR_NO_SUCH_DEVINST unless
there was already a PNPC031 device installed which drivers it can
update.
Here is my simple test project:
http://www.uwe-sieber.de/temp/installmodem.zip
Any hints?
Uwe