summaryrefslogtreecommitdiff
path: root/plugins/SMS/src/AdditionalFunctions/MemoryFindByte.h
blob: 98fed3c44e997242c16a56c52a3ae446f7cf3569 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#if !defined(AFX_MEMORYFINDBYTE__H__INCLUDED_)
#define AFX_MEMORYFINDBYTE__H__INCLUDED_

__inline LPVOID MemoryFindByte(size_t dwFrom,LPCVOID lpcSource,size_t dwSourceSize,unsigned char chWhatFind)
{
	if (lpcSource && dwSourceSize)
		if (dwFrom < dwSourceSize)
			return memchr((BYTE*)lpcSource + dwFrom, chWhatFind, dwSourceSize-dwFrom);

	return NULL;
}

#endif // !defined(AFX_MEMORYFINDBYTE__H__INCLUDED_)