Heap corruption detected at 01670000 While Using CString

The Following is my function:

CString CMem::GetALLData(UINT uStartStep, CString cRequests)
	CString Package = "",sSteps, Buffer = "";
		int PLen = cRequests.GetLength(), Size = 0, Steps;

		if( Valid()  && pMemStatus != NULL && pMediaBuff != NULL && PLen !=
			for( int i = 0; i < PLen * 8; i++)
				// if the request part is not in the list
				if( uStartStep + i > CurrentStep && uStartStep + i < CurrentStep +
					Steps = uStartStep + i - CurrentStep;
					//if( pMemRSTimes[Steps] <= 0)
						//TRACE("^^^^^^^^^^^^^^^^^^^^ Times Useout!!!
					if( ( cRequests[ i / 8] & ( 1 << ( 7 - i%8))) > 0 &&
pMemStatus[Steps] == 1/* && pMemRSTimes[Steps] > 0*/)
	//					if( Size > MaxRequestSize)
	//						break;
						pMemRSTimes[Steps] --;
						sSteps.Format( "%10d", uStartStep + i);
						Buffer = CString( pMediaBuff + 1000 * Steps, 1000);
						Package += sSteps;
						Package += Buffer;
						Size ++;
	//		if( Size < MinRequestSize)
	//			Package = "";
	catch(CException* e)
		Package = "";
    return Package;

It stop with the error "Heap corruption" at "Package += Buffer "about
2-3 hours after I start the program.

Any Advice is OK,
thank a lot

5/24/2006 6:34:25 AM
vc.mfc 33608 articles. 0 followers. Follow

0 Replies

Similar Articles

[PageSpeed] 33


Similar Artilces:

Exchange 2003 upgrade:Out 2001 for Mac doesn't detect new server ?
Darn. I moved a mailbox from an Exch2000 to an Exch2003 box; After 2 hours, I go to the Mac 9.2, Out 2001 for Mac and I see in properties that server is still the Exch2000. I try to access my mailbox and it fails. Anyone there can confirm whether Outlook 2001 for Macs is unable to 'auto' detect the new Exch2003 mailbox server ? ...

Convert Publisher Web page for use on Bell (Canada) Web Hosting
I have created my dream web site using Publisher, followed the steps to convert it to a web site. When I try to upload it to my pre-arranged domain, using Firezilla, there is a problem. The Tech assistants at Bell tell be that Publisher is not Bell friendly, but that there is some magical way to create an index file that is acceptable. Does anyone have any insight into this problem? -- Can''t we get together on this If you are talking about http://www.bellhosting.ca/en/index.htm then it appears that the hosting plans have FTP uploading, so you must be making a mistake when u...

using if in a range
I am trying to workout numerology in excel: I have number 1-9 in row - 1 Alphabets A-I in row - 2 Alphabets J-R in row - 3 Alphabets S-Z in row - 4 I wish to know if I input a value from "A-Z" in different cells, I should get corresponding numeric values say A20=S,B20=A,C20=I in three different cells should return A21=1,B21=1,C21=9 Can somebody help me resolve this? Thanks, =MOD(CODE(A20)-65,9)+1 Or, if the numbers in row 1 might change: =INDEX($A$1:$A$20,MOD(CODE(A$20)-65,9)+1) "Sai" <Sai@discussions.microsoft.com> wrote in message...

Corrupt Porfolio data
I'm using Money UK version 12 and my portfolio data has become corrupted. It now shows some investment data in triplicate, for example buy transactions are shown 3 times, as are dividends, consequently the holding value is way out. It also shows all investment data for stocks which have been part of the portfolio in the past,i.e it shows all the stocks I've ever held as current in the portfolio. This seems to be because the file show a triplicate buy but only a double sell!! It will only allow me to delete a single instance of the triplicate data......This is the second time thi...

Using wild cards in array formulas?
Hi, How would I write a formula to use wildcards in an array formula? Say I have two columns, one has values such as 2L90, 2L91, 2L92, 2L54, 2L55 etc. and I want to select all the 2L90/91/92, and add up the numbers in the other column. I can never remember whether I need sum, sumif, count, countif etc. But also how to do wildcards, if it's even possible. ={sum((a1:a50,"2L9*")*(b1:b50))} Thanks! Norm Try the following:- =SUMPRODUCT((LEFT(A1:A50,3)="2L9")*(B1:B50)) -- Regards Ken....................... Microsoft MVP - Excel Sys Spec -...

PDF conversions often result in corrupted photos
I use Microsoft Publisher 2003. I frequently encounter problems with the PDF file conversion (I use full version Adobe Acrobat). I don't know if the problem is with Adobe or with Publisher. Frequently, photos that look just fine in Publisher are corrupted in the PDF file (e.g., pixel squares show, picture looks like there is a fine line going thru it horizontically). To work around it, I have to go back into the Publisher file, delete the photo, re-insert the SAME phone and reconvert that page to PDF--this resolves the problem 99% of the time. However, I don't understand why it ...

Using MapiSendMail, "To" field displays "=SMTP..." instead of Name
I am using Simple MAPI function MapiSendMail from an MFC application (code below if you're interested), and it works as advertised on the machines at my location, but not on my clients' machines. I populate the MapiRecipDesc with the appropriate values for name and address, and when I run the application at my location, the e-mail that gets displayed shows the correct "name <address>" in the "To" box, and it all worbs properly. The string value that I use in the lpszAddress member is correctly formatted as "SMTP:address". When my client runs t...

MDF Corruption
Hello everyone, While writing to the SQL Server database, I might encounter the below error message: ā€œError 823 I/O error <error> detected during <operation> at offset <offset> in file '<file>'ā€ This error message may occur every time when I start SQL Server and access the MDF file. Thanks in advance. Hi It says that an I/O operation failed at the OS level and the I/O subsystem is causing corruption If you move the MDF on another physical disk, see if you got this error again? "suehoege" <u57145@uwe> wrote in mess...

Probable Corrupt Excel File
I am using version 2002 Excel. The file I am trying to open is a multi sheet workbook. It contains many links. When there are no problems opening the file, it will ask whether or not I want to disable/enable macros. With this corrupt file, it does not ask this question and just opens. When opened, I have lost my multiple sheets and now I have only one which has 12,952 lines of characters. The single sheet contains the file name on the tab. Instead of an XLS extension, thre is now an XLSM extension. Also, when trying a save as, the properties indicate this to be a Microsoft Offic...

"Use Word 2003 to edit e-mail messages" grayed out in Outlook 2003
Thanks for your help in advance. I am in a Domino/Notes shop, but do have Outlook 2003 installed on my hard drive. I recently got it to work with the Domino server, using Microsoft's Notes connector. My system also has the rest of Office 2003 installed (including Word 2003.) Everything in Outlook seems to work great (I can send and receive email, can see calendars, etc.) However, Outlook forces me to use its internal HTML email editor to compose email. I would like to use Microsoft Word. When I go to Tools --> Options --> Mail Format, the two boxes relating to the use of MS Wo...

SQL SRS cannot use the website MSCRM 1.2 08-24-06
When i try upgrade the CRM 1.2 to version 3, all goes well except for the following problem. *********************************************************** SQL Server Reporting Services cannot use the Web site Microsoft CRM Version 1.2 because it has an identifier that the SQL Server Reporting Services setup cannot handle. You can either reinstall IIS to have IIS create the Default Web site, or modify the IIS metabase by changing the identifier for Web site Microsoft CRM Version 1.2 to 4. I would really appreciate it if someone could help me with this matter. ...

Runtime error 94 invalid use of null #2
this is when creating a matrix item on the till. we go into quantity view and the error appears Microsoft RMS Windows Vista Thanks ...

Mail only for internal use
Hi! One of our clients wants to configure mailbox users that only send/receive internal mails. They don't want that those users send or receive mails from external domains on the Internet. What are the possible ways to do it? Thank you! Hi, Set the user to recieve mail from 'authenticated users' only. This is set at | Properties of User | Exchange General | Delivery Restrictions | Message Restrictions | From authenticated users only. Ensure you don't have 'resolve anonymous email' ticked on your SMTP vs otherwise this will break this. Oliver On Wed, 28...

Escalation using workflow
Hi Has anyone managed to get escalation to work in workflow? If so how? In particular, I am trying to write a workflow rule which creates an Activity (phone call) to be completed and if the owner does NOT complete it within the designated timeframe, a follow up should be assigned to the original person's manager. The initial activities are fine. However, it seems that I can wait until the activity is complete, but this is not what I want. I need to check for failure to complete. Any ideas? Thanks Gill Gill It appears you can put a time on an object such as an account that...

Installation of Crystal Reports says that 9.2.0 detected, needs 9.
Hello, I am in the process of installing CRM 1.2 on a Windows 2003 SBS server. I have gotten to the point of installing the Crystal Reports that comes with CRM onto the server. When I try to install Crystal Reports, it says that it has detected version 9.2.0 on the server and it needs to be upgraded to v9.2.2 before installation of CR can continue. The only copy of CR that I can figure out that is on the server is the copy that came with Visual Studio. I can't figure out how to tell what its version number is.. Its a pretty stripped down copy of CR. Looking at the makers of ...

Here was my problem. I archived about 2400 emails in 2 files of about 300MB each in OUTLOOK 2000. When I went to add them back in they were seemingly empty. I had no errors when importing them or when Opening them through File\Open\...pst file. But when I would look at the folders in outlook - they were empty. They were just plain "EMPTY". No emails. One showed a folder (INBOX) - but that too was empty. I ran scan disk and scanpst.exe. What really scared me was the fact that scanpst.exe told me there were 5 folders and NO ITEMS in either file. That file HAD 1300+ emails...

Using a datasheet subform as record selector
Dear all, I have an unlinked datasheet subform which I'm using as a quick view list / record selector for the main (detail) form. Basically I'm trying to duplicate split form functionality, but I can't use a split form because it destorys my formatting. So far I have the following code: In the subform: With Me.Parent.RecordsetClone .FindFirst ("daID = " & Me.daID) If Not .NoMatch Then Me.Parent.Recordset.Bookmark = .Bookmark End If End With In the mainform: With Me.sfcAlertSplit.Form.RecordsetClon...

Useful Additions
It would be helpful when looking through postings to have the page selection repeated at the bottom of the current page so that one could Go to the next page without having to scroll back to the top. Also - is it possible to arrange Search results in date order? ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and ...

outlook 2003 pst corruption
I have had several users complain about the pst files not working. I have been running scanpst.exe on a regular basis to repair errors. Some of the data files are relatively large 500-2000 mbs. Any help would be appreciated. steve <sjnystro@iastate.edu> wrote: > I have had several users complain about the pst files not > working. I have been running scanpst.exe on a regular > basis to repair errors. Some of the data files are > relatively large 500-2000 mbs. 500-2000 Mb is not large for a Unicode (OL 2003) PST. Unicode PSTs can be 20 Gb are more. Make sure that ...

How to use Boundchecker to check memory leaks in dlls
hi all, am very new to use the tool bounce checker.I m having a dll,which needs to be checked for memory leak. how can I do it... am having very little time to do this check.So, please give me the steps to do it. any help ... Regards hari On May 9, 12:14 pm, hari <haricib...@gmail.com> wrote: > hi all, > am very new to use the tool bounce checker.I m having a dll,which > needs to be checked for memory leak. how can I do it... > > am having very little time to do this check.So, please give me the > steps to do it. > > any help ... > > Regards > hari ...

Excel file or sheet is corrupt
My excel file seems to be coorupt. All grid lines are not visible and the background is a full grey colour? ...

Detecting connected modems
Hi, How do I detect what modems are connected to the system? I believe there should be some TAPI APIs available, but am not sure. I also need the properties of the modem, like name, type, etc. TIA, SD What you need to do is call lineInitialize or lineInitializeEx, this call returns the number of devices avaliable to you. The device ids are 0 based to the number it returned - 1. then you can call lineGetDevCaps to get information about the line take a look at this for some help http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wcecomm5/html/wce50conresourceinventoryand...

How do I use cell color in formulas?
Is there some way I can create a function that uses the cell color? What I want to do is something like COUNT IF cell-color = magenta Mike, have a look here for a way to do it, http://www.cpearson.com/excel/colors.htm -- Paul B Always backup your data before trying something new Please post any response to the newsgroups so others can benefit from it Feedback on answers is always appreciated! Using Excel 2002 & 2003 "Mike" <Mike@discussions.microsoft.com> wrote in message news:647A8061-7AD4-4923-96FF-F881052FC90D@microsoft.com... > Is there some way I can create ...

How do I remove a corrupted file from a mailbox
I use Veritas Backup Exec 10.0 to backup the exchange mailboxes. I get a failure everyday saying that a file is corrupt and the backup failed. How do i find and remove this one file so that i will quit getting a failure on my backup log. I tried using Exmerge but i cannot get it to even execute. are you performing brick-level backups? not just backing up the stores? -- Susan Conkey [MVP] "tchast" <tchast@discussions.microsoft.com> wrote in message news:54690CDA-74DA-449D-85EF-EC703E4B912C@microsoft.com... > I use Veritas Backup Exec 10.0 to backup the exchange ...

WinDbg: Heap corruption detected at 01864DC8
I finally got WinDbg to give me some info. I'm new to WinDbg and could use some help deciphering the output. I'm familiar with assembly language. I'm debugging a program for which I have no source code, only the ..exe and related .dll files. It's not my program. This program works fine on some computers, but not others. It consistently bombs on my computer. Took a lot of work just to get this far. Everything is going fine until here, where WinDbg output says: (I'll try to pretty this up as many of these lines are long) ModLoad: 035e0000 03641000 C:\DOCUME~1\DAVIDD~1\LO...