Advertisement

Enumerating modems

Started by February 13, 2002 02:51 PM
0 comments, last by Y2Kbug 22 years, 11 months ago
Please help me with enumerating of modems. How to do it, samples from SDK doesn''t work.
RasEnumDevices() does what you need.

  RasEnumDevices(NULL, &lpcb, &lpcDevices);lpRasDevInfo = (LPRASDEVINFO) GlobalAlloc(GPTR, lpcb);lpRasDevInfo->dwSize = sizeof(RASDEVINFO); nRet = RasEnumDevices(lpRasDevInfo, &lpcb, &lpcDevices);if (nRet != 0){    printf("RasEnumDevices failed: Error %d", nRet);}else{    printf("The following RAS capable devices were found on this machine:\n\n");    for (i=0; i < lpcDevices; i++)    {        printf("%s\n",lpRasDevInfo->szDeviceName);        lpRasDevInfo++;    }}  

This topic is closed to new replies.

Advertisement