一.C#封装成DLL 1.在VS中创建项目选择类库,命名 myDll 2.建立好项目后自动生成的代码如下: 代码修改如下,添加自己要封装的C#代码,注意修饰符必须为public using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace myDLL { public class Class1 { //封装的DLL函数 public int add(int x, in
批量注册当前文件夹中的dll和ocx 新建文件:RegisterDllAndOcx.bat @echo off echo hello,girl~~ for %%i in (*.dll *.ocx) do ( echo %% register is starting... C:\Windows\System32\regsvr32.exe %%i /s echo %%i register is finished... ) pause 备注:可根据显示需要,酌情修改~