UCHAR arrSlave[MAX_READ_SIZE] = { 0 };
USHORT arrI2CType[MAX_READ_SIZE] = { 0 };
UINT arrReadAddr[MAX_READ_SIZE] = { 0 };
UINT arrReadData[MAX_READ_SIZE] = { 0 };
for (UINT i = 0; i < MAX_READ_SIZE; ++i) //Memory error here
{
arrSlave[i] = (UCHAR)uiSlave;
arrI2CType[i] = (USHORT)uiI2CType;
arrReadAddr[i] = uiStartAddr + i;
arrReadData[i] = 0;
}
The above code is a DLL I wrote and is called by an exe
There is no problem in the DEBUG environment.
In the RELEASE environment, there will be a certain probability of downtime in the for section, not every time. . . . .
error:
0xC0000005: An access violation occurred when reading location 0xFFFFFFFF.
Aucun commentaire:
Enregistrer un commentaire