Results 1 to 3 of 3

Thread: Causes Crashes

Threaded View

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Sep 2000
    Location
    England
    Posts
    94

    Causes Crashes

    Hey Guys

    Code:
    void CMiscFunctions::CopyValueToBuffer(BYTE *pDataToCopy, BYTE *pBuffer, DWORD *dwLengthOfBuffer, DWORD dwSizeOfData)
    {
    
    	DWORD i = *dwLengthOfBuffer;
    
    	for(DWORD y = 0; y < dwSizeOfData; y++, i++)
    	{
    		pBuffer[i] = pDataToCopy[y];
    	}
    
    	*dwLengthOfBuffer = i;
    
    }
    This little piece of code works fine copying one buffer to the other up to 59kb if the buffer is bigger then this the program crashes any ideas. I originally had int y not DWORD y and was convinced it was the problem but it still causes a crash.

    Any Ideas

    Peter
    Last edited by pskyboy; Sep 29th, 2001 at 06:08 AM.
    "Let's all join forces, rule with an iron hand...and prove to all the world, metal rules the land..."
    -- Judas Priest

    My email is [email protected]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width