- typedef struct
- {
- BYTE Type;
- union ALLSTRUCT
- {
- struct INDEXANDSTOCK
- {
- char Code[8];
- char Name[10];
- DWORD Close;
- DWORD Open;
- DWORD High;
- DWORD Low;
- DWORD New;
- DWORD Pbuy1;
- float Vbuy1;
- DWORD Pbuy2;
- float Vbuy2;
- DWORD Pbuy3;
- float Vbuy3;
- DWORD Pbuy4;
- float Vbuy4;
- DWORD Psell1;
- float Vsell1;
- DWORD Psell2;
- float Vsell2;
- DWORD Psell3;
- float Vsell3;
- DWORD Psell4;
- float Vsell4;
- float Volume;
- float Amount;
- float Cjbs;
- DWORD Syl;
- BYTE Reserved[9];
- }IndexAndStock;
- struct DAYLINE
- {
- char Code[8];
- BYTE Records;
- struct DayK
- {
- time_t Date;
- DWORD Open;
- DWORD High;
- DWORD Low;
- DWORD Close;
- float Volume;
- float Amount;
- }Record[4];
- char Reserved[6];
- }DayLine;
- struct INFORMATION
- {
- BYTE SubType;
- time_t Time;
- WORD Serial;
- BYTE Proviter;
- WORD Total;
- WORD PacketNumber;
- WORD InfoLength;
- char Info[110];
- char Reserved[3];
- }Information;
- struct TXTFILE
- {
- char Name[100];
- BYTE FileType;
- time_t Time;
- char Reserved[22];
- }TxtFile;
- struct MINUTE
- {
- char Code[8];
- time_t Time;
- BYTE Records;
- struct MinRec
- {
- DWORD Price;
- float Volume;
- float Amount;
- }Record[9];
- char Reserved[6];
- }Minute;
- struct WIGHTINTEREST
- {
- char Code[8];
- BYTE Records;
- struct Wight
- {
- time_t Time;
- DWORD Give;
- DWORD Pei;
- DWORD PeiPrice;
- DWORD Bonus;
- }Record[5];
- char Reserved[18];
- }WightInterest;
- }AllStruct;
- }MAINSTRUCT;
- struct STOCK
- {
- char StockCode[8];
- char StockName[10];
- float fNew;
- float fClose;
- float fOpen;
- float fLow;
- float fHigh;
- float fAmount;
- float fVolume;
- };
- static BOOL bRestart;
- static int DataPacketNum;
- static MAINSTRUCT DataPacketStruct[5];
- static HWND hMainWnd;
- static UINT uMessage;
- static HANDLE hThread;
- static DWORD ThreadID;
- void StoreMyCountFile(void);
- int ReadMyCountFile(void);
- BOOL CreateDataPacketStructs(int PacketNum);
- BYTE CreateDataType();
- UINT WorkerThreadProc(LPVOID pParam);
- _declspec(dllexport) DWORD WINAPI InitCard(HWND hWnd, UINT Msg);
- _declspec(dllexport) void WINAPI EnableMessage(BOOL flag);
- _declspec(dllexport) void WINAPI GetCardInfo(DWORD * nCardNumber, DWORD * CardVer);
- _declspec(dllexport) int WINAPI ReceiveInfo(void);
- _declspec(dllexport) int WINAPI ReadMyCount(void);
- _declspec(dllexport) void WINAPI DataAcquisition(MAINSTRUCT& Packet, int i);