DeviceID: Not working anymore on WM 6?!

  • Thread starter Thread starter James Caan
  • Start date Start date
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
 
Back
Top