_ExternalApplication.UnregisterSolution(String) 方法

定义

卸载指定的 Microsoft InfoPath 表单模板。

public:
 void UnregisterSolution(System::String ^ bstrSolutionURI);
public void UnregisterSolution(string bstrSolutionURI);
abstract member UnregisterSolution : string -> unit
Public Sub UnregisterSolution (bstrSolutionURI As String)

参数

bstrSolutionURI
String

该字符串值指定表单模板的统一资源标识符 (URI)。

示例

在以下示例(以 C# 编程语言编写)中,对象的 UnregisterSolution 方法 ExternalApplication 用于卸载表单模板:

private void UninstallForm()
{
 ExternalApplication infoPath = new ExternalApplicationClass();

 infoPath.<span class="label">UnregisterSolution</span>(@"C:\My Forms\MyFormTemplate.xsn");
}

注意:上述示例假定 Microsoft.Office.Interop.InfoPath 正在使用命名空间,并且引用了 Microsoft InfoPath 3.0 类型库。

在以下示例(以 C# 编程语言编写)中,对象的 UnregisterSolution 方法 ExternalApplication 用于卸载表单模板:

private void UninstallForm()
{
 ExternalApplication infoPath = new ExternalApplicationClass();

 infoPath.<span class="label">UnregisterSolution</span>(@"C:\My Forms\MyFormTemplate.xsn");
}

注意:上述示例假定 Microsoft.Office.Interop.InfoPath 正在使用命名空间,并且引用了 Microsoft InfoPath 3.0 类型库。

注解

如果无法撤消对表单模板的注册,则 UnregisterSolution 方法将返回错误。

适用于