Results 1 to 12 of 12

Thread: Problem with Comm control (trying to make Caller ID app)

  1. #1

    Thread Starter
    Next Of Kin baja_yu's Avatar
    Join Date
    Aug 2002
    Location
    /dev/root
    Posts
    5,989

    Problem with Comm control (trying to make Caller ID app)

    Hi everyone. Long time no see.
    I need a little help with the Comm control. I found this topic with code for detecting Caller ID.

    http://www.vbforums.com/showthread.php?t=103953

    The problem is, when ever I try to run the code it errors on this line:

    VB Code:
    1. MSComm1.PortOpen = True

    saying: Runtime error 8012. The Device is not open.

    I have no idea how to solve this. Other options are all set correctly (Com port, etc)

  2. #2

  3. #3
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Problem with Comm control (trying to make Caller ID app)

    I assume that you designated which COM port and set the settings?

    In your device manager do you have any yellow exclamation points on the port in question?
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  4. #4
    Frenzied Member David.Poundall's Avatar
    Join Date
    Sep 2002
    Location
    Robin Hood Land
    Posts
    1,457

    Re: Problem with Comm control (trying to make Caller ID app)

    Alternatively, what does hyperterminal say about the com port - does it recognise it as existing?
    David

    Learn the Rules so that you know how to break them properly.

    Printing dll dBTools MZTools Winsock API WinsockVB More Winsock SGrid2 MSChart Mail2Web

    If you have found this thread useful then read this

  5. #5
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,132

    Re: Problem with Comm control (trying to make Caller ID app)

    I don't believe MSComm control supports CallerID at all.

  6. #6
    Frenzied Member David.Poundall's Avatar
    Join Date
    Sep 2002
    Location
    Robin Hood Land
    Posts
    1,457

    Re: Problem with Comm control (trying to make Caller ID app)

    You have to have a modem capeable of detecting it as caller ID comes in between rings. You should see

    RING
    01753 678345
    RING
    01753 678345

    In the receive string on the comm port. Alternatively on a ring you interrogate an S register on the modem for a number.
    David

    Learn the Rules so that you know how to break them properly.

    Printing dll dBTools MZTools Winsock API WinsockVB More Winsock SGrid2 MSChart Mail2Web

    If you have found this thread useful then read this

  7. #7
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,132

    Re: Problem with Comm control (trying to make Caller ID app)

    Yes, a "capable modem" is a mandatory requirement, but MSComm control must also support this feature and I don't think it was designed for that purpose, though. Few years back I gave up on it and went for a third party to save time (and aggravations ) ...

  8. #8
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Problem with Comm control (trying to make Caller ID app)

    Here is a project that works on my machine, but we're having trouble deploying on my friends machine. It's from psc.

    http://www.Planet-Source-Code.com/vb...48942&lngWId=1

    You also need this to have it talk, as well as the SpeechTAPI module, unless you already have a \Windows\Speech folder on your system. I googled and found it.
    It's also in the faq at the bottom of the link.
    Attached Files Attached Files

  9. #9
    Junior Member
    Join Date
    May 2005
    Posts
    17

    Re: Problem with Comm control (trying to make Caller ID app)

    While very simple to use MSComm control to "talk" AT commands to a modem, it is extreamly specifiic to Modem model & Brand.

    For anything to be used more than once and /or on different systems, TAPI is the best choice. Unimodem or AT commands are too modem specific.

    MS has some sample TAPI apps.

  10. #10
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,132

    Re: Problem with Comm control (trying to make Caller ID app)

    I agree that TAPI library is the best ... there is however one little "problem" with it: very complex and difficult to use so it does require serious level of expertise in this area.

  11. #11
    Junior Member
    Join Date
    May 2005
    Posts
    17

    Re: Problem with Comm control (trying to make Caller ID app)

    If the portopen fails it is because either the port doesn't exist, you have it open already in your program or another application (or device driver) is using it.

  12. #12
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Problem with Comm control (trying to make Caller ID app)

    See if you can open it in HyperTerminal. Do you have any fax software running?
    Something is probably using the port. Did my upload work for you?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width