LboxBasp


  GetBody



  
// *********************************************************
// 本文読出し
// 戻り値 : true 成功, false 失敗
// *********************************************************
BOOL LboxBasp::GetBody(	
	LboxString *LFile, LboxString *LBody )
{
	return LboxBasp::GetBody(
		LFile->szLboxString,
		LBody
	);
}
BOOL LboxBasp::GetBody(	
	LPTSTR lpFile, LboxString *LBody )
{
	this->ErrorDescription.SetChar(0,0);

	if ( this->lib == NULL ) {
		this->ErrorDescription.operator = (
			"Bsmtp.dll がインストールされていません"
		);
		return false;
	}

	LPFUNC_BMIME DllBMIME;
	LPFUNC_BFreeArray DllBFreeArray;

	DllBMIME =
		(LPFUNC_BMIME)GetProcAddress( lib, "BMIME" );
	if ( DllBMIME == NULL ) {
		return false;
	}
	DllBFreeArray =
		(LPFUNC_BFreeArray)GetProcAddress( lib, "BFreeArray" );
	if ( DllBFreeArray == NULL ) {
		return false;
	}


	int nRet;
	RetArray ra;

	this->ErrorDescription.SetChar( 0, 0 );
	nRet = DllBMIME(
		"GETNOF",
		lpFile,
		this->RcvDir.szLboxString,
		&ra,
		this->ErrorDescription.szLboxString
	);
	if ( nRet <= 0 ) {
		return false;
	}

	int i;
	LboxString LString;

	LBody->SetChar( 0, 0 );
	for( i = 0; i < ra.counter; i++ ) {
		LString.operator = (ra.array[i]);
		LString.SetChar( 5, 0 );
		if ( LString.operator == ("Body:") ) {
			LString.operator = (ra.array[i]);
			LString.Replace( "Body: ", "" );
			if ( LBody->nLboxString
				< LString.nLboxString ) {
				LBody->Resize( LString.nLboxString );
			}
			LBody->operator = (&LString);
			break;
		}
	}

	DllBFreeArray(&ra);

	return true;

}
  










  infoboard   管理者用   
このエントリーをはてなブックマークに追加





フリーフォントWEBサービス
SQLの窓WEBサービス

SQLの窓フリーソフト

素材

一般WEBツールリンク

SQLの窓

フリーソフト

JSライブラリ