using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Runtime.InteropServices;//提供了一个方法集,这些方法用于分配非托管内存、复制非托管内存块、将托管类型转换为非托管类型,此外还提供了在与非托管代码交互时使用的其他杂项方法
namespace LogisticsManage
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
[DllImport("coredll.dll")]
private extern static int GetDeviceUniqueID([In, Out] byte[] appdata,
int cbApplictionData,
int dwDeviceIDVersion,
[In, Out] byte[] deviceIDOuput,
out uint pcbDeviceIDOutput);
private void button1_Click(object sender, EventArgs e)
{
b
WINCE 获取智能设备唯一编号
最新推荐文章于 2020-09-23 17:37:53 发布
该篇博客介绍如何在Windows CE系统中使用C#获取设备的唯一标识。通过DllImport调用`coredll.dll`库的`GetDeviceUniqueID`方法,传入应用数据和设备ID版本,获取并展示设备的16进制唯一ID。
摘要由CSDN通过智能技术生成