hi everyone, i bought serial programmer expecting to use it without hard times. The brand is SOFI SP8-B a chiness programmer. i just need ur help to write serial numbers after programming an EEPROM chip (w25q16cvsig). i am sending sample file for the serialization may be one of u guys can help, thanks.
the are the source code.




// SampleSN.cpp : ¶¨Òå DLL Ó¦ÓóÌÐòµÄÈë¿Úµã¡£
//

#include "stdafx.h"
#include "stdio.h"

1 BOOL APIENTRY DllMain( HANDLE hModule,
2 DWORD ul_reason_for_call,
3 LPVOID lpReserved
4 )
5 {
6 return TRUE;
7 }


8 const char AUTOSN_DISC[] = "This is a sample.";


/**************************************** **************************************** ********************
** DLL¿âÃèÊö **
** ×î´óÔÊÐí128¸ö×Ö·û **
**************************************** **************************************** ********************/
9 extern "C" __declspec(dllexport) void GetDescription(char * ptext)
10 {
11 strcpy(ptext, AUTOSN_DISC);
12 }


/**************************************** **************************************** ********************
** ×Ô¶¯ÐòÁкŸüк¯Êý **
** **
** ´«Èë²ÎÊý: pBuf - оƬÊý¾Ý»º³åÇøÖ¸Õë(²»ÔÊÐí³¬³öоƬµÄÈÝÁ¿· ¶Î§) **
** pMsg - »Ø´«ÃèÊöÐÅÏ¢, ×î¶à64¸öÓ¢ÎÄ×Ö·û(32¸öÖÐÎÄ×Ö) **
** ÿִÐÐÒ»´ÎоƬÉÕ¼ºó, ´ËÐÅÏ¢½«×Ô¶¯ÏÔʾÔÚ²Ù×÷ÐÅÏ¢´°ÄÚ ** **
**************************************** **************************************** ********************/
13 extern "C" __declspec(dllexport) void UpdateSN(BYTE * pBuf, char * pMsg)
14 {
15 DWORD dwCount;
16
17 dwCount = pBuf[0];
18 dwCount |= pBuf[1] << 8;
19 dwCount |= pBuf[2] << 16;
20 dwCount |= pBuf[3] << 24;
21
22 dwCount++;
23
24 pBuf[0] = (BYTE)(dwCount & 0xff);
25 pBuf[1] = (BYTE)(dwCount >> 8);
26 pBuf[2] = (BYTE)(dwCount >> 16);
27 pBuf[3] = (BYTE)(dwCount >> 24);
28
29 sprintf(pMsg, "[SampleSN.DLL]ÐòÁкŸüÐÂΪ: %8.8X", dwCount);
30 }