取消注册可插入终端
一般情况下,此方法将从 DllUnregisterServer 调用。 以下示例代码可以放入 DllUnregisterServer 的代码中。
ITPluggableTerminalClassRegistration* pTerminal;
BSTR bstrTerminalSuperclass = SysAllocString(L"{F7438990-D6EB-11d0-82A6-00AA00B5CA1B}");
// If (NULL == bstrTermSuperclass) process the error here.
BSTR bstrTerminalClass = SysAllocString(L"{AED6483E-3304-11d2-86F1-006008B0E5D2}");
// If (NULL == bstrTerminalClass) process the error here.
HRESULT hr;
hr = CoCreateInstance(
CLSID_PluggableTerminalRegistration,
NULL,
CLSCTX_INPROC_SERVER,
IID_ITPluggableTerminalClassRegistration,
(void**)&pTerminal);
hr = pTerminal->put_TerminalClass( bstrTerminalClass );
// If (hr != S_OK) process the error here.
hr = pTerminal->Delete( bstrTerminalSuperclass );
// If (hr != S_OK) process the error here.
// Release the memory created by SysAllocString().
SysFreeString(bstrTerminalClass);
SysFreeString(bstrTerminalSuperclass);
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈