Bagera
23rd January 2007, 09:40 PM
Hi guys,
I've made a simple program that uses google to compare hits on different strings. The program works fine on my computer, but compiling it with the Windows Mobile SDK has been a struggle. Eventually it compiles, but it does not work :(
I know that the problem has to do with how I am using the Connction Manager functions. I've found a few examples, but they are all pretty big and confusing.
The following did not work at all:
#include <connmgr.h>
CONNMGR_CONNECTIONINFO sInf;
DWORD dwCurrentStatus, dwStatus;
HANDLE hConnection = NULL;
ConnMgrConnectionStatus(hConnection, &dwCurrentStatus);
if (dwCurrentStatus != CONNMGR_STATUS_CONNECTED)
{
ConnMgrEstablishConnectionSync(&sInf, &hConnection,
30000, &dwStatus);
}
if(dwCurrentStatus != CONNMGR_STATUS_CONNECTED ||
dwStatus != CONNMGR_STATUS_CONNECTED)
AfxMessageBox(L"Not Connected to manager");
What is the minimum code to get my app connected, so that I may use functions like InternetOpenURL?
Any tips, links, guides etc. would be great ;)
Bagera
I've made a simple program that uses google to compare hits on different strings. The program works fine on my computer, but compiling it with the Windows Mobile SDK has been a struggle. Eventually it compiles, but it does not work :(
I know that the problem has to do with how I am using the Connction Manager functions. I've found a few examples, but they are all pretty big and confusing.
The following did not work at all:
#include <connmgr.h>
CONNMGR_CONNECTIONINFO sInf;
DWORD dwCurrentStatus, dwStatus;
HANDLE hConnection = NULL;
ConnMgrConnectionStatus(hConnection, &dwCurrentStatus);
if (dwCurrentStatus != CONNMGR_STATUS_CONNECTED)
{
ConnMgrEstablishConnectionSync(&sInf, &hConnection,
30000, &dwStatus);
}
if(dwCurrentStatus != CONNMGR_STATUS_CONNECTED ||
dwStatus != CONNMGR_STATUS_CONNECTED)
AfxMessageBox(L"Not Connected to manager");
What is the minimum code to get my app connected, so that I may use functions like InternetOpenURL?
Any tips, links, guides etc. would be great ;)
Bagera