GetScanValue() returns BADF00D on large scan results

Find a Bug? Have a Problem? Like to Suggest a Feature? Do it Here

Moderators: g3nuin3, SpeedWing, WhiteHat, mezzo

GetScanValue() returns BADF00D on large scan results

Postby pn0k » Sun Dec 30, 2007 2:56 am

GetScanValue returns BADF00D on me every single time I use it (with around 20366231 search results). Here's my code;

Code: Select all
DWORD dwScanTotalClients = GetScanTotal(); // 20366231 in one case
    PrintF("%d", dwScanTotalClients);
   
    // Save addresses
   FILE* file2 = FOpen("C:\\dm.txt", "w");
   
   int a = 0;
   int b = 1;
   char str[50];
   for (int i = 0; i < dwScanTotalClients; ++i)
   {
      LPVOID lpvAddress;
      float fValue;

      if ( GetScanValue( i, &lpvAddress, &fValue ) )
      {
         FPrintF(file2, "0x%X\n", lpvAddress); // BADF00D in every single entry in file (verified with PrintF)
      }
   }
    FClose(file2);
pn0k
I Have A Few Questions
 
Posts: 7
Joined: Thu Nov 15, 2007 5:31 am

Postby L. Spiro » Sun Dec 30, 2007 3:25 pm

Several hours ago MHS 4.0.0.12 was reuploaded with two new functions:
LockScanForRead() and UnlockScanForRead().


Call LockScanForRead() before going into the loop. If it fails, leave the function (and close the file of course).

Call UnlockScanForRead() after the loop, before leaving the function.


L. Spiro
User avatar
L. Spiro
L. Spiro
 
Posts: 3129
Joined: Mon Jul 17, 2006 10:14 pm
Location: Tokyo, Japan


Return to Bugs/Problems/Suggestions

Who is online

Users browsing this forum: No registered users and 0 guests