-
大小: 35KB文件類型: .rar金幣: 2下載: 0 次發布日期: 2023-12-02
- 語言: C#
- 標簽: C#,ActiveX??
資源簡介
C#編寫ActiveX控件,使用VS2008開發,親測可用,里面兩個方法int Test(int x, int y),string ShowMsg(),并提供IE調用的頁面例子。
先用RegAsm.exe對控件進行注冊,Cmd命令進入下載解壓后的目錄(cd命令應該會吧~-~),輸入RegAsm.exe "RwCardActiveX.dll",注冊成功
后用IE(ActiveX只認IE瀏覽器*_*)打開Test.htm就可以看到你想看到的東西啦~~

代碼片段和文件信息
using?System;
using?System.Collections.Generic;
using?System.Text;
using?System.Runtime.InteropServices;
namespace?RwCardActiveX
{
?????[ComImport?GuidAttribute(“CB5BDC81-93C1-11CF-8F20-00805F2CD064“)]
?????[InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIUnknown)]
?????public?interface?IobjectSafety
?????{
?????????[PreserveSig]
?????????int?GetInterfaceSafetyOptions(ref?Guid?riid?[MarshalAs(UnmanagedType.U4)]?ref?int?pdwSupportedOptions?[MarshalAs(UnmanagedType.U4)]?ref?int?pdwEnabledOptions);
?
?????????[PreserveSig()]
?????????int?SetInterfaceSafetyOptions(ref?Guid?riid?[MarshalAs(UnmanagedType.U4)]?int?dwOptionSetMask?[MarshalAs(UnmanagedType.U4)]?int?dwEnabledOptions);
?????}
?}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件??????53248??2007-10-24?01:47??RwCardActiveX\RegAsm.exe
?????文件???????4608??2017-11-23?08:48??RwCardActiveX\RwCardActiveX\bin\Debug\RwCardActiveX.dll
?????文件??????11776??2017-11-23?08:48??RwCardActiveX\RwCardActiveX\bin\Debug\RwCardActiveX.pdb
?????文件???????2508??2017-11-23?08:48??RwCardActiveX\RwCardActiveX\bin\Debug\RwCardActiveX.tlb
?????文件???????1229??2017-11-24?08:04??RwCardActiveX\RwCardActiveX\obj\Debug\RwCardActiveX.csproj.FileListAbsolute.txt
?????文件???????6656??2017-11-24?08:04??RwCardActiveX\RwCardActiveX\obj\Debug\RwCardActiveX.dll
?????文件??????11776??2017-11-24?08:04??RwCardActiveX\RwCardActiveX\obj\Debug\RwCardActiveX.pdb
?????文件????????539??2017-11-24?08:04??RwCardActiveX\RwCardActiveX\obj\RwCardActiveX.csproj.UnmanagedRegistration.cache
?????文件????????725??2017-11-23?09:51??RwCardActiveX\RwCardActiveX\ob
?????文件???????1427??2017-11-23?09:55??RwCardActiveX\RwCardActiveX\Properties\AssemblyInfo.cs
?????文件???????3825??2017-11-24?08:03??RwCardActiveX\RwCardActiveX\RwCardActiveX.cs
?????文件???????2744??2017-11-24?08:03??RwCardActiveX\RwCardActiveX\RwCardActiveX.csproj
?????文件???????4608??2017-11-23?08:48??RwCardActiveX\RwCardActiveX.dll
?????文件????????929??2017-11-23?08:08??RwCardActiveX\RwCardActiveX.sln
????..A..H.?????17920??2017-11-24?08:08??RwCardActiveX\RwCardActiveX.suo
?????文件???????2508??2017-11-23?08:48??RwCardActiveX\RwCardActiveX.tlb
?????文件????????919??2017-11-24?08:08??RwCardActiveX\Test.htm
?????目錄??????????0??2017-11-24?08:47??RwCardActiveX\RwCardActiveX\obj\Debug\Refactor
?????目錄??????????0??2017-11-24?08:47??RwCardActiveX\RwCardActiveX\obj\Debug\TempPE
?????目錄??????????0??2017-11-24?08:47??RwCardActiveX\RwCardActiveX\bin\Debug
?????目錄??????????0??2017-11-24?08:47??RwCardActiveX\RwCardActiveX\obj\Debug
?????目錄??????????0??2017-11-24?08:47??RwCardActiveX\RwCardActiveX\bin
?????目錄??????????0??2017-11-24?08:47??RwCardActiveX\RwCardActiveX\obj
?????目錄??????????0??2017-11-24?08:47??RwCardActiveX\RwCardActiveX\Properties
?????目錄??????????0??2017-11-24?08:47??RwCardActiveX\RwCardActiveX
?????目錄??????????0??2017-11-24?08:49??RwCardActiveX
-----------?---------??----------?-----??----
???????????????127945????????????????????26
- 上一篇:WPF進度條演示程序
- 下一篇:C# 計算機軟硬件信息獲取
評論
共有 條評論