What I am making made a mistake? When I compile the function appear the following messages of error:
c:\vce\include\arm\connmgr.h(13) : error C2059: syntax error : ','
c:\vce\include\arm\connmgr.h(13) : error C2143: syntax error : missing ')' before 'constant'
c:\vce\include\arm\connmgr.h(13) : error C2143: syntax error : missing '{' before 'constant'
c:\vce\include\arm\connmgr.h(13) : error C2059: syntax error : '<Unknown>'
c:\vce\include\arm\connmgr.h(13) : error C2059: syntax error : ')'
c:\vce\include\arm\connmgr.h(16) : error C2059: syntax error : ','
c:\vce\include\arm\connmgr.h(16) : error C2143: syntax error : missing ')' before 'constant'
c:\vce\include\arm\connmgr.h(16) : error C2143: syntax error : missing '{' before 'constant'
c:\vce\include\arm\connmgr.h(16) : error C2059: syntax error : '<Unknown>'
c:\vce\include\arm\connmgr.h(16) : error C2059: syntax error : ')'
c:\vce\include\arm\connmgr.h(19) : error C2059: syntax error : ','
c:\vce\include\arm\connmgr.h(19) : error C2143: syntax error : missing ')' before 'constant'
c:\vce\include\arm\connmgr.h(19) : error C2143: syntax error : missing '{' before 'constant'
c:\vce\include\arm\connmgr.h(19) : error C2059: syntax error : '<Unknown>'
c:\vce\include\arm\connmgr.h(19) : error C2059: syntax error : ')'
c:\vce\include\arm\connmgr.h(22) : error C2059: syntax error : ','
Code: Select all
// Header file: <connmgr.h>
// Library linked: CellCore.Lib
// Pocket Pc: Properly create GPRS connection (My ISP) in Connections Settings
// Connections Settings, Advanced Tab, Select Networks Button, set to My ISP
HB_FUNC (GPRSCONNECTION)
{
HANDLE phWebConnection = NULL;
DWORD pdwStatus = 0;
ConnMgrConnectionStatus (phWebConnection, &pdwStatus);
if (pdwStatus == CONNMGR_STATUS_CONNECTED)
{
hb_retl (TRUE);
}
else
{
CONNMGR_CONNECTIONINFO sConInfo;
memset (&sConInfo,0, sizeof (CONNMGR_CONNECTIONINFO));
sConInfo.cbSize = sizeof (CONNMGR_CONNECTIONINFO);
sConInfo.dwParams = CONNMGR_PARAM_GUIDDESTNET;
sConInfo.dwPriority = CONNMGR_PRIORITY_USERINTERACTIVE;
sConInfo.dwFlags = CONNMGR_FLAG_PROXY_HTTP;
sConInfo.bExclusive = FALSE;
sConInfo.bDisabled = FALSE;
sConInfo.guidDestNet = IID_DestNetInternet;
if (ConnMgrEstablishConnection (&sConInfo, &phWebConnection) == S_OK)
{
for (unsigned int k = 0; k < 8; k ++)
{
ConnMgrConnectionStatus(phWebConnection,&pdwStatus);
if (pdwStatus == CONNMGR_STATUS_CONNECTED)
{
hb_retl (TRUE);
}
else
{
if (pdwStatus == CONNMGR_STATUS_CONNECTIONCANCELED || pdwStatus == CONNMGR_STATUS_WAITINGCONNECTIONABORT)
{
hb_retl (FALSE);
}
Sleep (2500);
ConnMgrConnectionStatus (phWebConnection, &pdwStatus);
if (pdwStatus == CONNMGR_STATUS_WAITINGCONNECTION)
{}
if (pdwStatus == CONNMGR_STATUS_CONNECTIONCANCELED || pdwStatus == CONNMGR_STATUS_WAITINGCONNECTIONABORT)
{
hb_retl (FALSE);
}
}
}
hb_retl (FALSE);
}
else
{
hb_retl (FALSE);
}
}
}