Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


CRC method?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
&Vage
Grandmaster Cheater Supreme
Reputation: 0

Joined: 25 Jul 2008
Posts: 1053

PostPosted: Mon Mar 09, 2009 3:56 pm    Post subject: CRC method? Reply with quote

Does anybody know any good CRC method that covers the whole 0x400000 - 0x800000; Currently mine crashes :S
Back to top
View user's profile Send private message
rapion124
Grandmaster Cheater Supreme
Reputation: 0

Joined: 25 Mar 2007
Posts: 1095

PostPosted: Mon Mar 09, 2009 4:22 pm    Post subject: Reply with quote

Code:

__checkReturn BOOL CalculateCrc(__in_deref PBYTE pData, __in SIZE_T dwLength, __out PDWORD pChecksum)
{
    BOOL bRet = TRUE;
    DWORD dwChecksum = 0;
    unsigned int i;

    for (i = 0; i < dwLength; i++)
    {
        try
        {
             dwChecksum += (pData[i] * i);
        }
        except (EXCEPTION_EXECUTE_HANDLER)
        {
             bRet = FALSE;
        }
    }
    return bRet;
}
Back to top
View user's profile Send private message
&Vage
Grandmaster Cheater Supreme
Reputation: 0

Joined: 25 Jul 2008
Posts: 1053

PostPosted: Mon Mar 09, 2009 4:35 pm    Post subject: Reply with quote

rapion124 wrote:
Code:

__checkReturn BOOL CalculateCrc(__in_deref PBYTE pData, __in SIZE_T dwLength, __out PDWORD pChecksum)
{
    BOOL bRet = TRUE;
    DWORD dwChecksum = 0;
    unsigned int i;

    for (i = 0; i < dwLength; i++)
    {
        try
        {
             dwChecksum += (pData[i] * i);
        }
        except (EXCEPTION_EXECUTE_HANDLER)
        {
             bRet = FALSE;
        }
    }
    return bRet;
}


Will it crash if I check 1000+ bytes?
Back to top
View user's profile Send private message
Zand
Master Cheater
Reputation: 0

Joined: 21 Jul 2006
Posts: 424

PostPosted: Tue Mar 10, 2009 4:09 am    Post subject: Reply with quote

rapion124 wrote:
Code:

__checkReturn BOOL CalculateCrc(__in_deref PBYTE pData, __in SIZE_T dwLength, __out PDWORD pChecksum)
{
    BOOL bRet = TRUE;
    DWORD dwChecksum = 0;
    unsigned int i;

    for (i = 0; i < dwLength; i++)
    {
        try
        {
             dwChecksum += (pData[i] * i);
        }
        except (EXCEPTION_EXECUTE_HANDLER)
        {
             bRet = FALSE;
        }
    }
    return bRet;
}


What happens to pChecksum?
Also, why not UINT?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites