1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
|
//write ComPort
char valor4[26] = ("at+cmgf=1");
BOOL bWriteRC4;
static DWORD iBytesWritten4;
bWriteRC4 = WriteFile(hComm, &valor4, 9, &iBytesWritten4,NULL);
char valor6 = carr;
BOOL bWriteRC6;
static DWORD iBytesWritten6;
bWriteRC6 = WriteFile(hComm, &valor6, 1, &iBytesWritten6,NULL);
char UitBuff[25];
DWORD dwBytesRead;
ReadFile(hComm, UitBuff, 20, &dwBytesRead, NULL);
char valor[26] = ("at+cmgs=\"+44*********\"");
BOOL bWriteRC;
static DWORD iBytesWritten;
bWriteRC = WriteFile(hComm, &valor, 23, &iBytesWritten,NULL);
char valor5 = carr;
BOOL bWriteRC5;
static DWORD iBytesWritten5;
bWriteRC5 = WriteFile(hComm, &valor5, 1, &iBytesWritten5,NULL);
char valor2[17] = ("test2");
BOOL bWriteRC2;
static DWORD iBytesWritten2;
bWriteRC2 = WriteFile(hComm, &valor2, 5, &iBytesWritten2,NULL);
char valor3 = ctrlz;
BOOL bWriteRC3;
static DWORD iBytesWritten3;
bWriteRC3 = WriteFile(hComm, &valor3, 1, &iBytesWritten3,NULL);
//Close ComPort
CloseHandle(hComm);
|