Desktop-as-a-Service Designed for Any Cloud ? Nutanix Frame

This article was contributed by Seain B. Conover.

Sample Image

Environment: VC6 SP2, NT4 SP5

Alright folks, this post is the result of probably a hundred email requests over the past few months, in response to my original inquiry about how to retrieve modem information. Now I'm sure 'ol BG and the boys would probably take a different approach, but this one works for me.

It's very simply really. Run the included sample exe (included in the ZIP archive) to see what I mean.

// number of modems in machine
const int GetModemCount() const;
// reset string
const CString GetModemResetString( const CString strName ) const;

// init string, with optional desired volume level specified
// error control on, compression on, hardward flow control, modulation CCITT, blind off, call setup fail timer, inactivity timer + if requested, includes  volume init
const CString GetModemInitString( const CString strName, const int nSpeakerVolume = -1 ) const;

// com port
const int GetModemComPort( const CString strName ) const;

// maximum bps as per control panel
const int GetModemBps( const CString strName ) const;

// fills CComboBoxBox with list of modem names
void FillComboBoxWithModemNames( CComboBox* pComboBox );

// fills CListBox control with list of modem names
void FillListBoxWithModemNames( CListBox* pListBox );

// first listed non-virtual modem name in registry
const CString GetFirstModemName() const;

// modem name based on index
const CString GetModemName( const int nIndex ) const;

// does modem have speaker
const BOOL GetModemHasSpeaker( const CString strName ) const;

// how many volume levels? 
const int GetModemVolumeLevelsCount( const CString strName ) const;

// is strName a valid modem?
const BOOL GetIsModem( const CString strName ) const;

Example Usage:

CModemInfo ModemInfo;
const CString strModemName = ModemInfo.GetFirstModemName();
const CString strInit = ModemInfo.GetModemInit( strModemName );
const int nComPort = ModemInfo.GetModemComPort( strModemName );

A more realistic usage of this class however, would be to use the member functions ::FillComboBoxWithModemNames() or ::FillListBoxWithModemNames() -- then once the user exits your modem setup window, you can retrieve the Initialization String, Com Port, and Maximum BPS using, based on the modem name they have selected.


Download demo project (includes source) - 132 Kb



  • How to answer through headphone/mic to opposite client

    Posted by Legacy on 11/05/2003 08:00am

    Originally posted by: Jebin

    Actually i call the client by dialing from computer, i have written code for that, after getting response from opposite side i couldn't answer to that opponent, that means my voice is not transfering through modem to opponent phone.
    how to enable my headphone/mic. Please help immediately.
    Thank you

    • sammmm

      Posted by alagurajan on 03/08/2005 07:44am

      ya i am also having the same problem some one plz replay soon

  • dial-up by modem

    Posted by Legacy on 05/24/2003 07:00am

    Originally posted by: pham ky thanh

    I want to build a program can auto dial by modem.
    In my program :
    -I can know status of modem includes: sended speed , recieved speed , transfered speed.
    -and more but I do not know what I should begin ?
    Please help me . Thank you very much .

  • tel. number dissalow

    Posted by Legacy on 04/30/2003 07:00am

    Originally posted by: chm0d

    how can i forbid the modem calling another number except the one stated in the dialog box when on the net(dialup)? thnx

  • How talk over tephone using modem and headphone/mic ? ? ?

    Posted by Legacy on 01/05/2003 08:00am

    Originally posted by: Pradyumna Kumar Jena

    dear sirs,
    i am using hayes commands to dial a telephone number. my connectivity is ok. but i am not able to talk using the headphone , connected to modem. but if i am using a telephone receiver connected parallally to the same modem , it is ok. but the problem is my program loose its control over the modem.
    please guide me. . . .
    With regards

  • Retrieving Modem Information

    Posted by Legacy on 04/02/2002 08:00am

    Originally posted by: babar

    hello! i would like to know how the phone number of a client connecting to RAS can be obtained programatically!
    i need to implement a CLI system!

  • So many questions, almost no answers!

    Posted by Legacy on 01/03/2002 08:00am

    Originally posted by: Aldamo

    Hi, people look for help, but nobody gives answers. Hey, gurus, where are you?

  • HELP!!! HELP!!! HELP!!!!

    Posted by Legacy on 12/15/2001 08:00am

    Originally posted by: Henry Liu

    A question,please!
    My modem has finish the job of dialing process,but without PPP connection. And how can I use serial port connected with that modem to serve RAS dailing. How to config or replace some modules?


  • How can I use computer as a answering machine

    Posted by Legacy on 09/29/2001 07:00am

    Originally posted by: Praveen Mohania

    I am working on a project which requires modem programming and aims at using computer as a answering machine.

    If there is any one who can help me in modem programming or who has any software on this topic please help me

    The project also requires an call identifier software which
    can detect the phone no. of the dialer If any one has a software on this or sorce code please help me. Language preference is VB or Vc++

  • How can i receive data from modem

    Posted by Legacy on 09/26/2001 07:00am

    Originally posted by: Muthamil Selvam. T

    Now i am devleloping one project - automatic answering ,
    in that i need a program to recives a phone call, then user press a number from telephone, i must recive the number based on that i replay to that phone ( as a voice data),

    Guide me to develop this project

  • I Need Your Help

    Posted by Legacy on 07/19/2001 07:00am

    Originally posted by: Md Elias

    I wants dialup with serialport communication source code.We wants to check 64kbps modem with rs-232 communication.First we have to dial with modem and after conntection is establised have send some data through same comport 1 and receive back the data.We have some problem with this testing.pls try to help

  • Loading, Please Wait ...

  • You must have javascript enabled in order to post comments.

Leave a Comment
  • Your email address will not be published. All fields are required.

Most Popular Programming Stories

More for Developers

RSS Feeds

Thanks for your registration, follow us on our social networks to keep up-to-date