|
From: Christian W. <Chr...@vo...> - 2002-10-24 12:19:59
|
unsigned Connect(char CalledPartyNumber[1024], char
CallingPartyNumber[1024])=20
{
_cmsg CMSG;
int error;
long Controller;
unsigned short CIPValue;
=20
Controller =3D GetFreeController();
if (Controller =3D=3D -1)=20
{
/*----- if no available controller use the first one for
correct -----*/
/*----- error signaling -----*/
Controller =3D 1;
};
int Connection =3D GetFreeLine();
=20
if (Connection =3D=3D -1)=20
{
printf("Error: no available connection identifiers\n");
/*----- no OS resources -----*/
return 0x1108;
};
=20
/*----- use ConnectionIdentifier as Messagenumber -----*/
CONNECT_REQ_HEADER(&CMSG, (WORD)dwApplID, (unsigned =
short)Connection,
Controller);
/*----- build up service mask -----*/
=20
CONNECT_REQ_CIPVALUE(&CMSG) =3D 0x1;
CONNECT_REQ_CALLEDPARTYNUMBER(&CMSG) =3D SetNumber =
(CalledPartyNumber);;
CONNECT_REQ_CALLINGPARTYNUMBER(&CMSG) =3D SetNumber =
(CallingPartyNumber);
CONNECT_REQ_B1PROTOCOL(&CMSG) =3D B1PROTOCOL;
CONNECT_REQ_B2PROTOCOL(&CMSG) =3D B2PROTOCOL;
CONNECT_REQ_B3PROTOCOL(&CMSG) =3D B3PROTOCOL;
CONNECT_REQ_B3CONFIGURATION(&CMSG) =3D B3CONFIGURATION;
return error;
};
BYTE *SetNumber(char Number[1024])=20
{
BYTE *CalledPartyNumberStruct =3D new BYTE[1024];
if (strlen(Number) >=3D 1)=20
{
int len;
=09
len =3D strlen(Number);
/*----- \xLen\x80 STRING '\0' -----*/
CalledPartyNumberStruct =3D (unsigned char *)malloc(len + 2 +
1);
=09
CalledPartyNumberStruct[0] =3D (unsigned char)(len + 1);
CalledPartyNumberStruct[1] =3D 0x80;
=09
strcpy ((char *)&(CalledPartyNumberStruct[2]), Number);
};
return CalledPartyNumberStruct;
};
-----Urspr=FCngliche Nachricht-----
Von: Daniel Glenfield [mailto:sp...@ho...]
Gesendet am: Donnerstag, 24. Oktober 2002 14:14
An: Chr...@vo...; dev...@li...
Betreff: Re: [Dev-C++] Strange phenomenon
Could be a scope problem. You'll need to show us the functions.
>From: Christian Wallukat <Chr...@vo...>
>To: "Dev-Cpp-Users@Lists. Sourceforge. Net (E-Mail)"=20
><dev...@li...>
>Subject: [Dev-C++] Strange phenomenon
>Date: Thu, 24 Oct 2002 13:51:23 +0200
>
>Hi List,
>
>
>i have a strange phenomenon in my project:
>
>I call a function: Test(char szTest[1024]) with Test("test");
>
>In that function another Function (like the first) will be called:
>Test2(szTest);
>
>the adress of szZest is 0x000000000....
>
>and the content is empty ....
>
>
>Anyone an Idea ????
>
>Kind r
>
>Chris
>
>
>-------------------------------------------------------
>This sf.net email is sponsored by: Influence the future
>of Java(TM) technology. Join the Java Community
>Process(SM) (JCP(SM)) program now.
>http://ad.doubleclick.net/clk;4729346;7592162;s?http://www.sun.com/java=
vote
>_______________________________________________
>Dev-cpp-users mailing list
>Dev...@li...
>TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm
>https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
_________________________________________________________________
Get a speedy connection with MSN Broadband. Join now!=20
http://resourcecenter.msn.com/access/plans/freeactivation.asp
|