|
// *********************************************************
// HTTP 接続
// 戻り値 : true 成功, false 失敗
// *********************************************************
BOOL LboxWininet::HTTPConnect( )
{
LboxWininet::Disconnect( );
this->hSession = InternetOpen(
this->Agent.szLboxString,
INTERNET_OPEN_TYPE_DIRECT,
NULL, NULL, 0
);
if ( this->hSession == NULL ) {
return false;
}
this->hConnect = InternetConnect(
this->hSession,
this->Server.szLboxString,
INTERNET_INVALID_PORT_NUMBER,
NULL,
NULL,
INTERNET_SERVICE_HTTP,
0,
NULL
);
if ( this->hConnect == NULL ) {
InternetCloseHandle( this->hSession );
return false;
}
return true;
}
| |