HRESULT PrintMIMETypes(IltmsServer* server)
{
HRESULT hr;
long count;
CComPtr<IltmsMIMETypes> types;
// print the MIME types to stdout
_tprintf(_T("--- MIME Types ---\n\n"));
hr = server->GetMIMETypes(&types);
if(FAILED(hr))
goto error;
hr = types->get_Count(&count);
if(FAILED(hr))
goto error;
for(long i = 0; i < count; i++)
{
CComBSTR extension;
CComBSTR contenttype;
hr = types->Item(i, &extension, &contenttype);
if(FAILED(hr))
goto error;
_tprintf(_T("MIME Type[%ld]: .%s, %s\n"), i, (LPCTSTR) CString(extension), (LPCTSTR) CString(contenttype));
}
error:
_tprintf(_T("\n"));
return hr;
}
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document