AfxBeginThread failure - how to find cause? #2

In an MFC pgm under VS2005sp1, I am creating a worker thread using
AfxBeginThread. Under certain circumstances which I can't quite pin
down, AfxBeginThread returns NULL, indicating it has failed. Is there
any way I can find out the cause of the failure, such as an error
code? I have tried tracing through the code with the debugger, but
what is apparently detecting the error condition is in MS code for
which I don't have the source.

My specific code is

CWinThread* pThread=AfxBeginThread(MyControlFunction,&ti,0/*priority*/,
230000000/*stack size*/);

and a test for pThread==NULL immediately following. It is a rather
large stack size.

The thread terminates by returning from MyControlFunction.

Usually creation of the worker thread succeeds the first time, and
fails the second. There seems to be some interaction between failure
and use of the file open common dialog in some preceding code.

0
sherwood (22)
3/13/2007 7:27:50 AM
vc.mfc 33608 articles. 0 followers. Follow

0 Replies
638 Views

Similar Articles

[PageSpeed] 35

Reply:

Similar Artilces:

Search Engine for finding text?
I have a project which requires me to be able to search across 500 - 1000 Visio documents looking for text within the document, (e.g., network device labels). Most search engines only return metadata (properties) information. Is anyone familiar with a utility than can do this type of search returning a hit list with links to the documents found? What operating system are you using? Win 2000 and XP can easily search for not only files but also text within the body of the file via Windows Explorer. Have you tried that? Randall Arnold "KM w1z" <w1z@swbell.net> wrote in mess...

no information on outlook calendar from Dec 1 #2
I have a strange problem, in my outlook calander for certain users i am finding no information from Dec 1 2004 onwards, but i have seen meeting availability for some users, if i try to set up an appoinment with any user, using outlook calendar after Dec 1 2004 no information, but i can see user's availability before that date. Any idea? ...

2 combo boxes on form
i have 2 combo boxes on my form, both combo boxes draw data from the same colum in a table. when i update one combo box the other combo box displays the same data that i updated. how can i make the combo boxes display different data from the same colum in the table? thank you. -- gary im sorry jeff, im new to this and i have trouble explaining...thank you for being patient -the fields in the table that is the forms record source is a list of names in a column, (in my table i have names listed in a single column) -on my form i have 2 combo boxes labeled "name" -when using m...

Finding e-mails
I had to re-install Windows 2000 Pro and it is making me re-install Office. I did this once before and couldn't find my current e-mails. Is there a way to find them? Thank you search for a rather large file with a .PST extension. It might be hidden. that should contain all your email, contacts etc. You can open it with Outlook and copy data over to your new profile. -- Bill Rodgers MVP "ReggieC" <ReggieC@discussions.microsoft.com> wrote in message news:8EA4B466-7D4C-40A5-993D-DA2540B70406@microsoft.com... >I had to re-install Windows 2000 Pro and it is making ...

Phantom email #2
I get new message alert in my toolbar; unopened envelope. But when I launch Outlook, there is no new mail in the inbox. Any ideas, anyone? Paul anonymous@discussions.microsoft.com <anonymous@discussions.microsoft.com> wrote: > I get new message alert in my toolbar; unopened envelope. > But when I launch Outlook, there is no new mail in the > inbox. Have you checked any other folder, like Delete Items or Junk E-mail? Perhaps you have a rule deleting the mesage or moving it to another folder. -- Brian Tillman ...

HidD_SetFeature Failure
Hi All, I'm new to HID class devices. I'm working on printers. I need to set the features on the printer. In HID class, i'm using HidD_SetFeature command for this. This is failing and when given GetLastError(), i get "The Semaphore Timeout period has expired". The part of code is #define PRINTER_SET_CONFIGURATION {0x1F...0x00,0x00} main() { BYTE bBuff[64] ; WORD wRead ; HANDLE h = openHid() ; if (h != INVALID_HANDLE_VALUE) { CheckDevice(h) ; BYTE bBuff[] = PRINTER_SET_CONFIGURATION; SetData_FeatureIn(h,4,bBuff) ; RecvData_FeatureIn(h,sizeof(bBuff),bB...

CRM 1-2 -> 3.0 Input string was not in a correct format. (upgrade
I've the same error during the upgrade from 1.2 to 3.0. I've tried without any opportunity to make sure not to have est. revenue data but the error is still there during upgrade. It happens during the ImportDefaultDataAction step near the end of the upgarde process. Otherwise 1.2 wasn't giving the error. Any idea? thanks in advance Refering to http://www.microsoft.com/Businesssolutions/Community/Newsgroups/dgbrowser/en-us/default.mspx?query=input+string&dg=microsoft.public.crm&cat=&lang=en&cr=US&pt=&catlist=8d3f188d-a0E9-40e4-86e2-46508a35c759&...

Find all objects to which a USER has access
Hi, I inherited an exhange infrastructure where even the Janitor has access to somoneelse's mailbox. I need to find out who has access to whose mailbox, any and all helpis highly appreciated. Thanks, TARAK ...

How to add a vertical line to a Line Chart that aleady has 2 Y axi
I want to add a vertical line to a chart to call out a specific date. I have two lines and am using 2 Y axis due to the difference in values of the two data series. For a given X value I want a vertical line to appear on the chart to make it clear that data to the right of the line is AFTER a certain thing was done. How do I do this? http://peltiertech.com/Excel/Charts/AddLine.html - Jon ------- Jon Peltier, Microsoft Excel MVP Peltier Technical Services Tutorials and Custom Solutions http://PeltierTech.com/ _______ ISUTUBBS wrote: > I want to add a vertical line to a chart to ca...

delivery failure error
"The e-mail account does not exist at the organization this message was sent to" then says user unknown, even though other comupters don't have that problem. I get this error for a few clients, yet other clients can email the same address. I have Windows small business server 2000, I am pretty sure everything has updated patches. I know i security updates automatically. My clients are an updated Windows XP SR 1 with Office 2003(outlook) SR1. ...

Where can I find poolmon.exe?
Hello, I need to run the tool called poolmon.exe, I have installed the Windows 2003 support tools and it doesn't appear to be in the list, any ideas? Whiteford wrote: > Hello, > > I need to run the tool called poolmon.exe, I have installed the Windows > 2003 support tools and it doesn't appear to be in the list, any ideas? http://www.microsoft.com/downloads/details.aspx?FamilyId=49AE8576-9BB9-4126-9761-BA8011FABF38&displaylang=en John "Whiteford" <no@no.com> wrote in message news:eYPpklDHLHA.5700@TK2MSFTNGP04.phx.gbl... >...

Calculate Days between 2 dates
Hiya, I'm using the simple option =A1-A2 to calculate the days (in cell A3) between 2 dates. Now I want to do the same but if A2 is blank the cell A3 has to stay bank too. How will I do this in a nice option? =IF(ISBLANK(A2),"",A1-A2) Regards, Stefi „MR.WJCA” ezt írta: > Hiya, > > I'm using the simple option =A1-A2 to calculate the days (in cell A3) > between 2 dates. > Now I want to do the same but if A2 is blank the cell A3 has to stay bank too. > How will I do this in a nice option? > ...

Messages delayed in categorizer #2
Hello: All of a sudden my messages are getting delaying in the categorizer. This mainly seems to be happening when messages are coming from my Front End server to my Back End server. If I track the messages I see them go into the categorizer then they pause for 20-40 minutes before the processing completes. Below are the details. 3/29/2007 2:11 SMTP: 3/29/2007 2:11 SMTP: 3/29/2007 2:11 SMTP: 3/29/2007 2:11 SMTP: You didn't say what version of Exchange. I would look at your routing configuration to see if there's a dead server still defined somewhere. -- Ed C...

do service packs cause invoices to move back to open?
Hello: A client is claiming that service pack 4 for GP 10.0, which we installed over the weekend, has caused her customer account balances and transactions to move back into an open status. Has anyone out there ever seen this happen? Is there a way to get those account balances paid and in history without screwing up deposits? childofthe1980s Hi, No. As a best practice you can always go back from your database backup to verify the records' status and balances prior to applying the service pack. This allow you and your client to appreciate the real scenario. You...

Viewing messages #2
When I get e-mail and try to view the messages, they never come up. Can someone help me? Not yet. State your Outlook version, the type of mail transport you are using, whether you are using a preview pane or opening the message, etc. --� Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. Due to the (insert latest virus name here) virus, all mail sent to my personal account will be deleted without reading. After searching google.groups.com and finding no answer, Wleef33 asked: | When I get e-mail and try to view the messages, they | never come ...

Find Function not seeking to target
MS Office Excel 2003 (11.5612.5606) ---- I've been using Excel more-or-less as a popular music database. Currently, this sheet contains 25,591 rows of data. I'd routinely used the Find funtion to locate information ... but, the function abruptly changed its behavior in an unfavorable way. Previously, when a search string was located, the information was centered in the window. Now, it is found and the cell's ID is show in the top left ... but, the row has to be scrolled to manually. Other sheets in the workbook are not affected, the Find functions as expected in them. Help wou...

CRM Exchang erouter failure
I have 1 user that I cannot deploy router rules for, the error report is below: Microsoft.Crm.Tools.ExchangeConnectorDeployment.RuleDeploymentException: Failed to save the rule to the user's mailbox. ---> System.ArgumentException: The parameter is incorrect. at Microsoft.Crm.Tools.RulesWrapper.RulesClass.Update(Int32 reload) at Microsoft.Crm.Tools.ExchangeConnectorDeployment.RuleDeploymentSession.DeployRule(DirectoryEntry userDirectoryEntry, String crmEmailAddress, Boolean disabledMode) --- End of inner exception stack trace --- at Microsoft.Crm.Tools.ExchangeConnectorDeployment...

import excel spreadsheet without empty rows (causing nulls)
Hi. I am trying to import an excel file into access. The import goes fine or so I thought. When I opened the table it had all my excel data plus over 9000 null valued records.So instead of getting a record set number of 200 records, I got over 9200. I have re imported the table after deleting empty rows (<-it felt pointless because there was nothing that I was deleting, I just figured there was something hidden) in the spreadsheet but it did the same thing. Is there something that attaches to the spreadsheet that causes null records? Please let me know if you know what has happened. Thank...

find links to another workbook
I have a huge workbook that somehow has a link to another workbook. I tried to search for the [ and found some of the links and removed them, but when I open the workbook it still states that there are links. How else can I fnd them. The workbook contains 30 sheets so looking in the cells will not help. Thanks There are several other options; 1) You may not know bu you can search multiple sheet by holding down CTRL or SHIFT then fist to last sheet, then doing a find on .xls 2) Use the Find Link add-in available at http://www.oaltd.co.uk/MVP/Default.htm Totaly free 3) Get...

BillPay #2
When will Money start using the the free MyCheckFree.com? This a free service now. What gives. Boo Microsoft. I may need to switch. Yikes! So why am I socked with a $5.95 monthly fee? Just because I use it within the Money program? I don't use my bank so not sure why I get the fee. Thanks! "Bogee" <Bogee@discussions.microsoft.com> wrote in message news:C06B9868-442D-4841-98D3-0C85524F86ED@microsoft.com... > When will Money start using the the free MyCheckFree.com? This a free > service > now. What gives. > > Boo Microsoft. I may need to switch. ...

Finding the combination that appears more times
Hi everybody i have a list on excel 2007 that displays the purchase of items on columns A:E, each column showing one (1) item I want to find what combination of items appears more times, especifically, which combination of four (4) is the favorite mix eg: A B C D F A C D E F B C D E F B C D F Z in this example, the winner would be (B, C, D, E) as it appears 3 times the main problem is that I have over 1,000 rows and trying with =SUMPRODUCT(COUNTIF(A1:E1,$N$1:$R$1)) por each combination would take forever... is there a simpler, quicker ...

How to find multiple cells/replace whole cells w/data
I am trying to find a specific set of characters in multiple cells in a column. Once found, I need to replace the data within found cells with a specific text string. I have been able to replace a text string, but not the whole cell. Perform a search and replace, and add an asterisk before and after your "search for" parameter. Replace with your desired cell contents. Search for: *your text here* Replace with: desired cell contents Instead of 'Find', turn on data filters and select Custom... Use the drop-downs to make the condition 'contains' and then ente...

Slow printing #2
Hi I am using a macro in Excel 97 to move fields from a record to a print template on a second sheet and then print it using the 'ActiveSheet.PrintOut' function. The macro loops through 100 records, scheduling the reports but takes forever to print them. There was a post some time ago with a similar problem and the suggestion was to disable the refresh screen or something like that. Any suggestions please. Charles ...

Glamour models & Fasion designing New look watch my profile http://www.geocities.com/cathrina39 #2
Glamour models & Fasion designing New look watch my profile http://www.geocities.com/cathrina39 ...

how to find a message SCL rating ?
hi, I'm trying to tune my IMF setup and so, I'm trying to see the SCL rating of some messages. how can I see it ? BTW, with IMF enabled on the server, do I still need to turn on SPAM checking in OL ? OL2K3/E2K3 TIA, Pierre. ...