xblydy

win7 c# 调用大漠

2015-02-28 14:02  西伯利亚冻原  阅读(523)  评论(0编辑  收藏  举报

第一  先注册大漠到电脑;

第二  在c# 添加引用中,选择Dm;

第三  开始的位置,添加 using.Dm;

第四  创建大漠对象,dmsoftClass dm = new dmsoftClass();

 

然后就可以使用大漠了。

 

如果出现 无法嵌入互操作类型 Dm.dmsoftClass 。请改用适用的接口,解决方法如下:

在引用那里找到Dm,右键选择属性,把嵌入互操作类型改为False就行了

 如果不懂注册,可以先用按键精灵注册大漠 这方面有很多现成的代码

 

using System;
using System.Collections.Generic;
using System. Diagnostics;
using System.Linq;
using System.Text;
using Dm;
using System.Runtime.InteropServices;

namespace 过你妹的情人节
{
class 西伯利亚
{

[DllImport("dm.dll")]
public static extern int DllRegisterServer();//注册用

static void Main(string[] args)
{
dmsoftClass dm = new dmsoftClass();
Console.WriteLine(dm.Ver());
Console.WriteLine(dm.GetDiskSerial());


int i = DllRegisterServer();
if (i >= 0)
Console.WriteLine("注册成功!");
else
Console.WriteLine("注失败!");

Console.ReadKey();
}
}
}

分类:

技术点:

相关文章:

  • 2021-12-21
  • 2021-08-17
  • 2021-12-01
  • 2021-11-10
  • 2022-12-23
  • 2021-05-19
  • 2021-12-12
猜你喜欢
  • 2021-06-10
  • 2021-12-12
  • 2021-07-21
  • 2021-12-11
  • 2021-11-14
  • 2021-12-12
  • 2021-08-09
相关资源
相似解决方案