Would someone point me to sample code ? or share their own ?
Here is my code , and the error I get is :ERROR_INVALID_PARAMETER.
int InternetSharingActivate()
{
InternetSharingConnectionType PublicType;
InternetSharingConnectionType PrivateType;
DWORD result;
PublicType= InternetSharing_Type_RNDIS;
PrivateType = InternetSharing_Type_CELLULAR_DATA;
result = InternetSharingEnable(
PrivateType,TEXT("RndisFn"), PublicType,TEXT("The Internet") );
if (result == ERROR_INVALID_PARAMETER)
{
printf(" ABCBridge :ConnMgr : InternetSharingActivate : result =
ERROR_INVALID_PARAMETER , %d",result );
MessageBox(NULL, TEXT("InternetSharingActivate :ERROR_INVALID_PARAMETER
"), NULL, MB_OK);
}
else if (result == ERROR_ALREADY_INITIALIZED)
{
printf(" ABCBridge :ConnMgr : InternetSharingActivate : result =
ERROR_ALREADY_INITIALIZED , %d",result );
MessageBox(NULL, TEXT("InternetSharingActivate :ERROR_ALREADY_INITIALIZED
"), NULL, MB_OK);
}
else
printf(" ABCBridge :ConnMgr : InternetSharingActivate : result =
%d",result );
return 0;
}
--
Greg Scott
Software Design Engineer, Windows CE
Microsoft Corporation
_____________________________________________________________
This posting is provided "AS IS" with no warranties, and confers no rights.
_____________________________________________________________
"yang-yang" <yang...@discussions.microsoft.com> wrote in message
news:4ABE0765-DE18-4AA5...@microsoft.com...