RBNUBE,

Here is the code for using MachineID in RB. I use it as a method. To test it as a demo (before receiving your own UserID and KeyCode), comment out the MID_R call and include the MsgBox call, compile and run in the same folder with the MachineID.dll file. You can use different hardware to form the MachineID by changing the SetHardware parameters.


Begin Method

  Declare Sub SetHardware Lib "MachineID" (HDD As integer, _
      CPU As integer, BIOS As integer )
  Declare Function GetMachineID Lib "MachineID" () As integer
  Declare Sub CopyMemory Lib "KERNEL32" Alias "RtlMoveMemory" _
      (hpvDest As integer, hpvSource As integer, cbCopy As integer )
  Declare Sub MID_R Lib "MachineID.dll" _
      (ByVal UserID As CString, ByVal LicenseKey As CString)

  Dim UID,LKey As String
  Dim m As new MemoryBlock(23)
  Dim addressBlock As new MemoryBlock(4)
  Dim theAddr As integer

  UID = "Your UserID"+chr(0)
  LKey = "Your LicenseKey"+chr(0)
  MID_R(UID,LKey)

  SetHardware(0,1,0)   ' UseHDD, UseCPU, UseBIOS

  addressBlock.Ptr(0) = m
  theAddr = addressBlock.Long(0)
  CopyMemory(theAddr,GetMachineID,24)

  'msgbox m.CString(0)

  return m.CString(0)

 End Method


Regards,

Art








From: "RBNUBE" <[EMAIL PROTECTED]>
Date: Mon, 12 Feb 2007 01:27:29 -0500


I obtained a copy of MachineID and got it converted to an internal RB
function (from VB). It works a treat and the price is right. It looks
like it will do what I need.


If it's not too complicated, can you share your conversion?


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to