I Am End Function serial number For Pocket PC
Posted: Thu Nov 17, 2005 10:08 am
Hello All
I Am End Function serial number For Pocket PC
This Function Now works 100%
But Not (Emie) serial number
He is Identical Library Dll (SMSpec.DLL)
Thank For each Human He Aid Me
----------------
Regards, Hathal
// Serial number
#include "FWCE.ch"
function Main()
local oWnd
DEFINE WINDOW oWnd TITLE "Serial N?"
@ 2, 2 BUTTON "Serial N?" SIZE 80, 25 ACTION MsgInfo(SerialNumber(),str(len(SerialNumber()) ))
ACTIVATE WINDOW oWnd
return nil
#pragma BEGINDUMP
#include <hbapi.h>
#include <windows.h>
#include <uniqueid.h>
// Function serial number For Pocket PC
// vce source code
// by hathal
HB_FUNC( SERIALNUMBER )
{
DWORD dwOutBytes;
const int nBuffSize = 4096;;
char strDeviceInfo[200]="";
byte arrOutBuff[nBuffSize];
char strNextChar[20]="";
char SerialNo[18]="";
BOOL bRes = KernelIoControl(IOCTL_HAL_GET_DEVICEID,
0, 0, arrOutBuff, nBuffSize,
&dwOutBytes);
if (!bRes)
{
MessageBox( GetActiveWindow(),_T("could not retrieve serial number"),_T("Error"),0);
hb_retc("0");
}
for (unsigned int i = 0; i<dwOutBytes; i++)
{
sprintf(strNextChar,"%02X", arrOutBuff);
strcat(strDeviceInfo,strNextChar);
}
memcpy(SerialNo, strDeviceInfo+40, 2);
memcpy(SerialNo+2, strDeviceInfo+45,9);
memcpy(SerialNo+11, strDeviceInfo+70,6);
memcpy(SerialNo+17, "\0",1);
hb_retc(SerialNo);
}
#pragma ENDDUMP
I Am End Function serial number For Pocket PC
This Function Now works 100%
But Not (Emie) serial number
He is Identical Library Dll (SMSpec.DLL)
Thank For each Human He Aid Me
----------------
Regards, Hathal
// Serial number
#include "FWCE.ch"
function Main()
local oWnd
DEFINE WINDOW oWnd TITLE "Serial N?"
@ 2, 2 BUTTON "Serial N?" SIZE 80, 25 ACTION MsgInfo(SerialNumber(),str(len(SerialNumber()) ))
ACTIVATE WINDOW oWnd
return nil
#pragma BEGINDUMP
#include <hbapi.h>
#include <windows.h>
#include <uniqueid.h>
// Function serial number For Pocket PC
// vce source code
// by hathal
HB_FUNC( SERIALNUMBER )
{
DWORD dwOutBytes;
const int nBuffSize = 4096;;
char strDeviceInfo[200]="";
byte arrOutBuff[nBuffSize];
char strNextChar[20]="";
char SerialNo[18]="";
BOOL bRes = KernelIoControl(IOCTL_HAL_GET_DEVICEID,
0, 0, arrOutBuff, nBuffSize,
&dwOutBytes);
if (!bRes)
{
MessageBox( GetActiveWindow(),_T("could not retrieve serial number"),_T("Error"),0);
hb_retc("0");
}
for (unsigned int i = 0; i<dwOutBytes; i++)
{
sprintf(strNextChar,"%02X", arrOutBuff);
strcat(strDeviceInfo,strNextChar);
}
memcpy(SerialNo, strDeviceInfo+40, 2);
memcpy(SerialNo+2, strDeviceInfo+45,9);
memcpy(SerialNo+11, strDeviceInfo+70,6);
memcpy(SerialNo+17, "\0",1);
hb_retc(SerialNo);
}
#pragma ENDDUMP