J
jingtao
Unregistered / Unconfirmed
GUEST, unregistred user!
如题.用METAEDIT查看,该项数据类型为Other,名称为空,值恒为4660.
用IWamAdmin接口是比较简单的.如下:
//启用默认文档 MD_DEFAULT_LOAD_FILE
memset(wszBuf, 0, ORIGINAL_BUFFER_SIZE*2);
MultiByteToWideChar(CP_ACP, 0, m_SiteInfo.Site_DefaultDoc, strlen(m_SiteInfo.Site_DefaultDoc)+1,
wszBuf, ORIGINAL_BUFFER_SIZE);
operRecord.metaRecord.dwMDIdentifier = MD_DEFAULT_LOAD_FILE;
operRecord.metaRecord.dwMDAttributes = 0;
operRecord.metaRecord.dwMDUserType = IIS_MD_UT_FILE;
operRecord.metaRecord.dwMDDataType = STRING_METADATA;
operRecord.metaRecord.dwMDDataLen = (wcslen(wszBuf)+1)*2;
operRecord.metaRecord.pbMDData = (unsigned char *)wszBuf;
operRecord.metaRecord.dwMDDataTag = 0;
if ( !ModifyData(operRecord) )
{
CErrorOperation::s_dwErrorCode = GetLastError();
CErrorOperation::WriteErrorLog();
return false;
}
但是我不想转换该接口,所以直接调用IIS的COM接口.结果发现如上问题.
用IWamAdmin接口是比较简单的.如下:
//启用默认文档 MD_DEFAULT_LOAD_FILE
memset(wszBuf, 0, ORIGINAL_BUFFER_SIZE*2);
MultiByteToWideChar(CP_ACP, 0, m_SiteInfo.Site_DefaultDoc, strlen(m_SiteInfo.Site_DefaultDoc)+1,
wszBuf, ORIGINAL_BUFFER_SIZE);
operRecord.metaRecord.dwMDIdentifier = MD_DEFAULT_LOAD_FILE;
operRecord.metaRecord.dwMDAttributes = 0;
operRecord.metaRecord.dwMDUserType = IIS_MD_UT_FILE;
operRecord.metaRecord.dwMDDataType = STRING_METADATA;
operRecord.metaRecord.dwMDDataLen = (wcslen(wszBuf)+1)*2;
operRecord.metaRecord.pbMDData = (unsigned char *)wszBuf;
operRecord.metaRecord.dwMDDataTag = 0;
if ( !ModifyData(operRecord) )
{
CErrorOperation::s_dwErrorCode = GetLastError();
CErrorOperation::WriteErrorLog();
return false;
}
但是我不想转换该接口,所以直接调用IIS的COM接口.结果发现如上问题.