🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #3005

Re: dialing a phone number

#3005
From: Morosh
Date: Sat, 09 Sep 2006 13:43
69 lines
2328 bytes
"Eangelo" <eangelo@libero.it> wrote in message
news:45003577$1@newsgroups.borland.com...
> If you are using a standard modem, basically you have to open the COM port
> to which the modem is connected, then to issue the following AT commands
> (<CR> is the character 0xD, 13 decimal):
>
> ATZ<CR>
>
> wait for "OK" from the modem and then:
>
> ATDT 0123456789;<CR>
>
> Don't forget the character ";" (semicolon) after the number to dial,
> otherwise the modem will try to connect in "data mode"
>
> To terminate the call:
>
> AT H0<CR>
>
> Henry
>
>
> "Morosh" <morisaab@yahoo.fr> ha scritto nel messaggio
> news:450019d6@newsgroups.borland.com...
> > Hello:
> >
> > I like to dial a phone number in C++, is it possible??
> > thanks
> > Maurice
> >
> >
> >
>
>

Hi:
I have two modems: one internal connected to com3, and one usb external
connected to com4
(information from Device Manager)
I tried the following:

#include "stdio.h"
#include "bios.h"

void main()
{
int x;

FILE* comport;

if(!(comport=fopen("COM3:","w+")))
    perror("COM3 not open.");
else
{
    fputs("ATDT01555444333\n",comport);
}
if(comport)  fclose(comport);
}

I compiled and the response is:

COM3 not open.: No such file or directory

(I tried both "com3" and "com3:" ), the same thing happens to com4

any idea??
thanks
Maurice
Technical Details
Message-ID: <4502c609@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news2.google.com!atl-c05.usenetserver.com!news.usenetserver.com!in01.usenetserver.com!news.usenetserver.com!newsfeed.media.kyoto-u.ac.jp!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <450019d6@newsgroups.borland.com> <45003577$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,ff63fb968e41f36a
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Morosh" <morisaab@yahoo.fr>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <450019d6@newsgroups.borland.com> <45003577$1@newsgroups.borland.com>
Subject: Re: dialing a phone number
Date: Sat, 9 Sep 2006 16:43:51 +0300
Lines: 74
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: 193.227.176.110
Message-ID: <4502c609@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1157809673 193.227.176.110 (9 Sep 2006 06:47:53 -0700)
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news2.google.com!atl-c05.usenetserver.com!news.usenetserver.com!in01.usenetserver.com!news.usenetserver.com!newsfeed.media.kyoto-u.ac.jp!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail