当前位置: 代码迷 >> Windows Mobile >> 关于获取mobile 手机IEMI的有关问题
  详细解决方案

关于获取mobile 手机IEMI的有关问题

热度:42   发布时间:2016-04-25 07:54:32.0
关于获取mobile 手机IEMI的问题
关于获取mobile   手机IEMI的问题
无法找到   PInvoke   DLL“Microsoft.MobileDevices.TuxNet.Core.dll”中的入口点“KernelIoControl”。  
[DllImport( "Microsoft.MobileDevices.TuxNet.Core.dll ")]是这个DLL吗,网上说是coredll.dll但我机器上没有这个。只有Microsoft.MobileDevices.TuxNet.Core.dll。有人知道是哪里的问题吗?


[DllImport( "Microsoft.MobileDevices.TuxNet.Core.dll ")]
                private   static   extern   bool   KernelIoControl(Int32   IoControlCode,   IntPtr
        InputBuffer,   Int32   InputBufferSize,   byte[]   OutputBuffer,   Int32
        OutputBufferSize,   ref   Int32   BytesReturned);
                private   static   Int32   FILE_DEVICE_HAL   =   0x00000101;
                private   static   Int32   FILE_ANY_ACCESS   =   0x0;
                private   static   Int32   METHOD_BUFFERED   =   0x0;
                private   static   Int32   IOCTL_HAL_GET_DEVICEID   =
                        ((FILE_DEVICE_HAL)   < <   16)   |   ((FILE_ANY_ACCESS)   < <   14)
                        |   ((21)   < <   2)   |   (METHOD_BUFFERED);


private   static   string   GetDeviceID()
                {
                        byte[]   OutputBuffer   =   new   byte[256];
                        Int32   OutputBufferSize,   BytesReturned;
                        OutputBufferSize   =   OutputBuffer.Length;
                        BytesReturned   =   0;
                     
                        bool   retVal   =   KernelIoControl(IOCTL_HAL_GET_DEVICEID,
                                IntPtr.Zero,
                                0,
                                          OutputBuffer,
                                                                          OutputBufferSize,
                                                                                                                  ref   BytesReturned);
  相关解决方案