Why do I get an error when calling FindPattern function? Code: bool Compare(const BYTE* pData, const BYTE* bMask, const char* szMask) { for (; *szMask; ++szMask, ++pData, ++bMask) if (*szMask == '0' && *pData != *bMask) return false; return (*szMask) == 0; } DWORD FindPattern(DWORD dwAddress, BYTE *bMask, char * szMask, DWORD dwLen) { for (DWORD i = 0; i < dwLen; i++) if (Compare((BYTE*) (dwAddress + i), bMask, szMask)) return (DWORD) (dwAddress + i); return false; } PS.: Error is: Send Error Report