using UnityEngine;
using System.Collections;
using System.Runtime.InteropServices;
public class what : MonoBehaviour {
[DllImport ("ETDogCheck")]
private static extern int et_FindToken (string et99pid, ref int et99count);
// Use this for initialization
public int sdfsdfwe;
public int rrrrrrr;
void Start () {
sdfsdfwe=et_FindToken("sdfdssdf", ref rrrrrrr);
}
// Update is called once per frame
void Update () {
}
void OnGUI(){
GUI.Button (new Rect (10,75,Screen.width - 220,40), "code:"+sdfsdfwe+"dog:"+rrrrrrr);
if(sdfsdfwe!=0){Application.Quit();}
}}unity3d 调用加密狗的dll
最新推荐文章于 2026-04-23 09:32:29 发布
本文介绍了一个使用C#编写的Unity脚本示例,该脚本通过DllImport属性调用外部DLL文件中的函数。此脚本展示了如何声明一个静态外部函数并传递字符串参数以及引用类型来获取返回值。
5513

被折叠的 条评论
为什么被折叠?



