HRESULT SetMIMEType(IltmsServer* server, LPCTSTR extension, LPCTSTR contenttype){HRESULT hr;CComPtr<IltmsMIMETypes> types;// this routine will set a content type for an extension// if extension == NULL, then the entire list is cleared// if contenttype == NULL, then the extension will be removed// *the extension should not include the starting period// retrieve a copy of the MIME Typeshr = server->GetMIMETypes(&types);if(FAILED(hr))goto error;if(extension != NULL){if(contenttype != NULL)hr = types->Add(CComBSTR(extension), CComBSTR(contenttype));elsehr = types->Remove(CComBSTR(extension));}else{hr = types->Clear();}// copy the MIME Types to the serverhr = server->SetMIMETypes(types);if(FAILED(hr))goto error;error: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
