// Use programID 'HKEY_CLASSES_ROOT\DirControl.DirList.1'.
string myString1 ="DIRECT.ddPalette.3";
// Use a nonexistent programID 'WrongProgID'.
string myString2 ="WrongProgID";
// Make a call to the method to get the Type information of the given ProgID.
Type myType1 =Type.GetTypeFromProgID(myString1,true);
Console.WriteLine("GUID for ProgramID 'DirControl.DirList.1' is: "+myType1.GUID);
// It throws an exception as, the ProgID is invalid and the 'throwOnError'
// flag is set to TRUE.
Type myType2 =Type.GetTypeFromProgID(myString2,true);
string myString1 ="DIRECT.ddPalette.3";
// Use a nonexistent programID 'WrongProgID'.
string myString2 ="WrongProgID";
// Make a call to the method to get the Type information of the given ProgID.
Type myType1 =Type.GetTypeFromProgID(myString1,true);
Console.WriteLine("GUID for ProgramID 'DirControl.DirList.1' is: "+myType1.GUID);
// It throws an exception as, the ProgID is invalid and the 'throwOnError'
// flag is set to TRUE.
Type myType2 =Type.GetTypeFromProgID(myString2,true);
解决方案 »
- ADO.NET程序的一个问题!!!
- 急!DataGridView如何在列上显示ComboBox修改数据库字段的方法
- backgroundWorker中OpenFileDialog()出错
- C#中 webBrowser 控件如何直接访问HTML源代码?
- 搞了一天了 郁闷啊 高手门帮个忙把
- write和writeline有什么区别啊 ?
- C#中要使用类似Java的Vector,应该用什么?
- [C# B/S UNIX ORACLE]C#写的B/S程序怎么调用UNIX环境下的ORACLE数据库阿?
- c#来电弹屏
- 请问如何检查WinForm的DataGrid中有没有数据被改动?
- 如何在系统菜单"关闭"后面添加一个"关于"菜单?
- 如何在DataGrid选定一行后按DEL键时拦截该事件?
使用GetTypeFromoProgIC()获得对象 (远程的话 一定得用remoting)如果想用asp调用 C#写的COM+,应该先把 .net组件做一个com的接口的DLL(有个命令行的工具),再用asp调用不同com的方法具体思路 与 vb6 调用.net compoent的方法 一样
(个人理解,未尝试过)