DeviceID: Not working anymore on WM 6?!


J

James Caan

Hello

I use the following code for generating a deviceID:
It did work on every WM 5 Device (PocketPC and Smartphone)
But it does not work anymore on a WM 6 Device?

Private Function GetDeviceID() As String
Dim deviceid As String = ""
Try
Dim DeviceIDinByte() As Byte = GetDeviceID("X3fggh23HHJlökj3ghe23ghbljk23")
For i As Integer = 0 To DeviceIDinByte.Length - 1
deviceid = deviceid & DeviceIDinByte(i)
Next
Catch
End Try
Return deviceid
End Function
<System.Runtime.InteropServices.DllImport("coredll.dll")> _
Private Shared Function GetDeviceUniqueID(ByVal appdata As Byte(), ByVal
cbApplictionData As Integer, ByVal dwDeviceIDVersion As Integer, ByVal
deviceIDOuput As Byte(), ByRef pcbDeviceIDOutput As Integer) As Integer
End Function
Public Function GetDeviceId(ByVal appData As String) As Byte()
Dim appDataBytes As Byte() = System.Text.Encoding.ASCII.GetBytes(appData)
Dim outputSize As Integer = 20
Dim output(19) As Byte
Dim result As Integer = GetDeviceUniqueID(appDataBytes, appDataBytes.Length,
1, output, outputSize)
Return output
End Function
 
Ad

Advertisements


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top