Dll function creating MFC dialog..

Hi
I am facing a crash only in 2k with the following scenario . In XP and 98 this problem is not observed
In my scenario I have X.exe, Y.dll.     Y.dll exports a function (say Z) which has DoModal() of a dialog called. X.exe on click of a button starts a thread and in that thread calls the Z method which shows up a dialog. The problem happens when the button is clicked thrice or more than thrice. The three dialogs are lauched in three threads and are shown. But if I try to move the dialogs, After some time a crash is seen, whcih occurs in a method of MFC42.dll.

More information about the scenario is X.exe links Y.dll statically. X links  MFC as a shared dll, where as Y.dll links the same as a static dll. I suspected module state change when the the control is going out of thread boundary to Dll. But the exported function already has AFX_MANAGE_STATE(AfxGetStaticModuleState( )); as te first statement.

Please let me know if any body faced the same problem before and point me towards the solution.
Thanks
Sre

0
anonymous (74722)
2/27/2004 5:21:09 PM
vc.mfc 33608 articles. 0 followers. Follow

0 Replies
430 Views

Similar Articles

[PageSpeed] 12

Reply:

Similar Artilces:

data from a modeless dialog box to its parent
I need to post a text data from a modeless dialog box to its parent which is itself a dialog based application. Since it should be a large text data a simple Windows message won't be good. What is the right way to do that? Thanks Gil If you are sure the data will stay current you can post the address of the data (as a pointer) in a windows message to the parent. If you want to be really sure use SendMessage() which will wait until the parent gets the message before returning. You could call a function or copy the data to a variable in the parent dialog, but that could be dang...

Mail merge recipient dialog box
Why are the "edit" and "refresh" buttons at the bottom of the mail merge recipient dialog box grayed out? They were available in the last Word version but I cannot figure how to access them in 7 to add to or correct my mailing list. In Word 2007, the first thing you have to do is select the name of the data source in the box at the bottom left of the dialog box. Then, depending on the type of data source, the Edit and Refresh buttons may be ungreyed. [FWIW the same dialog is used by MS Publisher, where they allow multiple data sources, requiring you to ...

Problem cut-n-paste function
I'm having a bizarre problem cut-n-pasting a very simple calculation (ie = A1 � B1) in C1 down the column (ie C2 to Cn). When I cut-n-paste the function in C1, value that displays is the same as the source cell. If I click on the target cell, the correct cells are highlighted and if I hit the enter button, the formula calculates as expected. What is going on? What do I have to do to force the formula to auto calculate? Turn on Automatic Calculation <g>. You do that at Tools/Options/Calculation. On 27 Sep 2004 18:56:34 -0700, jsausten@hotmail.com (Stephen Miller) wrote: >I'm...

Modal Dialog OnCancel removes SC_CLOSE
Hello, I have an app with an modal dialog in which I have removed the default cancel behaviour by creating an empty OnCancel(). Now I can't close the dialog using the SC_CLOSE (Red-X in upper right corner) Why and how can I remove ending the dialoq by pressing Esc but still be able to close the dialog by clicking on the Red-X[1] // Anders -- English is not my first, or second, language so anything strange, or insulting, is due to the translation. Please correct me so I may improve my English! [1] if someone has a official name for this button I would be grateful! Anders Eriksson s...

Job Listing- VC++ MFC with Isofttech
Position: Technical Lead Experience: VC++/C++ with MFC Good to have: Wireless 802.11 Skills & Windows development experience. 5-6 years of experience. Work Location: Chennai Education: BE/B Tech, ME/M Tech ( CS,IT,ECE,EEE) Do send in your CV to sridhar.doss@consultniche.com thanks s.doss niche consulting ...

Best book for learning MFC/VC 7.1 for developing rich GUI apps ?
Hi, I am a C/C++ developer of quite a few yesrs, although I am relatively new to Windows (Unix background). I am about to begin work on a project that would require me to develop several GUI rich frontend applications. I would like to hear from developers ou there if there is a book they would recommend, to help me hit the ground running - i.e. a book that is NOT an introductory text on programming/C++ but rather one that dives straight in and shows how to create front ends (possibly widgets etc) - using the VC IDE, one that covers all I need to know about MFC to start working on a re...

Save a Copy/Overwrite changes dialog box
All of a sudden, this dialog box pops up every time I want to save something in Excel 2002. The box says, "The file '<file name>' may have been changed by another user since you last saved it. In that case, what do you want to do? __ Save a Copy __ Overwrite changes even though I'm the only user that's changed anything in the past 3 years. The shared workbook command has not been changed at all, so that can't be the problem. The settings are the same as the ones I have at home for personal spreadsheets that don't have this dialog box. Help! Than...

create xml document based from schema
I have the following schema. I need to know how to make an xml document based from it. The main worry I have is the DateTime field. <?xml version="1.0" encoding="utf-8"?> <xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="NewsArticle"> <xs:complexType> <xs:sequence> <xs:element name="Description" type="xs:string" /> <xs:element name="Body" type="xs:string" />...

creating labels
hi, how can i create labels so I can input about 100 names and they will print off in a label style, Ive tried everything please help!! -- \m/ O_O \m/ Laura..... :) Liverpool, England Laura, I would do a mail merge with word, For help on Word mail merge using Excel as the data source have a look here http://www.mvps.org/word/FAQs/MailMerge/CreateAMailMerge.htm http://www.mvps.org/word/FAQs/MailMerge/CreateADataSource.htm http://www.mvps.org/dmcritchie/excel/mailmerg.htm -- Paul B Always backup your data before trying something new Please post any response to the newsgroups s...

Creating a new default message template
I have a email template that I want to make the default. In other words, when you click on New to create a new email, I want the message template that I have created to come up as the default. Does anyone know how to do this? What you are proposing is a very bad idea. Using a custom form as the = default for new messages will guarantee that non-Outlook recipients = won't be able to read attachments you send.=20 I'd suggest that you back up and explain what functionality you were = hoping to add by changing the message form, and in what version of = Outlook.=20 --=20 Sue Mosher, ...

can't reply or can't create
I have Outlook 6.0 in my Windows 2000 computer. I can't reply or create new message but I can read the message. The "Reply" "new" "forword" and "reply all" button are dead. I can't highlight those button. Does anyone has any problme of this? Plez let me know <mmdir2002@yahoo.co.uk> wrote in message news:1106036722.098189.74470@c13g2000cwb.googlegroups.com... > > I have Outlook 6.0 in my Windows 2000 computer. > I can't reply or create new message but I can read the message. > The "Reply" "new" "f...

mpweb.dll and keyhook.dll
keyhook.dll mpweb.dll I ran a Spyware program and it listed these two dll's as key logger's and that I should remove them. I did a search on Google and it confirmed that Keyhook.dll (which is located in the Microsoft Money SYSTEM sub-directory along with mpweb.dll) is a key logger. I am asking for the expertise of the group to help me out here because I don't know if these dll's are good or bad dll's for sure. Thanks in advance for your help! In microsoft.public.money, Andy wrote: > >I ran a Spyware program and it listed these two dll's as key logger'...

COleSafeArray::Create throws CMemoryException
Hi why does COleSafeArray::Create throw a CMemoryException if the array to create is larger than ullAvailPhys but smaller then ullAvailVirtual as returned by GlobalMemoryStatusEx Are all safearrays kept in physical memory and not swapped to page file I use Windows XP Thank HS ...

Need to create an automatic hyperlink
I'm using Excel 2003, Windows XP. Okay I have a workbook with a main spreadsheet and about 150 other spreadsheets with images in them. I have the names of the other spreadsheets in cell b2. How do I create a hyperlink that will concantenate the name in cell b2 to a hyperlink and point it to the spreadsheet with that name? I know I can do it by manually selecting each cell and hyperlinking manually, but with over 150 it's taking a while. Thanks. I tried =HYPERLINK("file:////"&b2,"Click me!") and it fails (can't find specified file)...

limit create window/control max count?
Hi all. I am testing a create control. But I want create many control (more 10000) in dialog. I test dynamic create CButton. It's created about 9800. I want work. 1. have a two dialog.(A, B) 2. A dialog has 40 controls(Button, Spin, static). 3. B dialog has contain A dialog. A dialog is more than 200. 4. create A dialog dynamic.(Using A->Create(IDD, this)) and attach B dialog. A dialog is modaless. 5. But not create about 190. dialog create function return 0. thank for read. Have a nice day. You need to redesign your system, IMO. -- - Mark Randall http://zetech.swehli.com...

Drill Down Function
I'm trying to create a function that will open a detail form based on a field value in a master form. I can do this using a private sub, but I hate replicating the same private sub over and over again each time I want to drill down from a different form or control. I also like being able to run a function directly from the On Double Click event of any given control and form without first having to go to a private sub. The function would have to be told the name of the detail form to open, the name of the key field in the detail form, and the value to search for. Here...

SERIES function disappear
I can't use SERIES in Excel 2007 (err msg, input function not correct) even i cant find SERIES function at "Insert function" dialog i disable Marco in Excel 2007, is it related? Pls Help, Thank you What were you expecting SERIES to do for you as a worksheet function? In Excel 2003, SERIES didn't exist in a worksheet, but only in a chart. -- David Biddulph "Vimm" <Vimm@discussions.microsoft.com> wrote in message news:1FA6C85E-A9F2-471F-9629-8ED8B9901CB8@microsoft.com... >I can't use SERIES in Excel 2007 (err msg, input function not correc...

Report Writer Dater Function
Hello: Does anyone know how to create a restriction in Report Writer to show the most recent date? I want to obtain the most recent date for the Apply to Document Date field in the body of my report. This field is in the Apply Open File (RM20201). Thanks. childofthe1980s ChildOfThe1980s, I would be more than glad to help if you could further explain what report in particular is this for, is it an aging? If so, would you like the most recent apply to date to display on a summary aging? Not sure I am following what you need. MG.- Mariano Gomez, MIS, MCP, PMP Maximum Global Busines...

Problem creating 2003 PST file
Hi, I am currently running Outlook 2003 (Client). I am trying to create a new PST file. However when I try to add a new file (file\new\outlook data file\) I can only select: Outlook 97-2002 Personal Folder File. On the microsoft website it says I should see something like "Office Outlook Personal Folders File (.pst)" but it is not listed. Is there any way to correct this?? I am running Outlook 2003 SP1. Thanks for any help, Wouter Hi, Kan iemand mij helpen? Het moet mogelijk zijn om bij het verzenden van een emailtje de afzender te veranderen. Ooit wist ik het, maar ik ben...

Creating users via powershell
I am using the windows powershell cmdlets to set up new users automatically in AD 2003. I am particularly using the cmdlets from quest such get-qaduser and new-qaduser. To setup bulk number of users I have to setup a csv file and then import them into the script. The script is below: #Get-UserGroups.ps1 #sample CSV heading # "Name,Firstname,Lastname,SAMAccountname,Telephone,Office,Department,Title,City,Company" $file="C:\employees.csv" if ((Get-Item $file -ea "silentlycontinue" ).exists) { Import-Csv $file | ForEach-Object { ...

How to know which mfc.dlls are needed to run my app
When I build a .exe using MFC, it won't run unless it can access the proper .dlls (mfc32d.dll, etc.). How can I find which .dlls I need to include when I want to install my software on another computer? First of all, if your application is complaining about a missing mfc DLL that has a "d" on the end of the name then you need to rebuild your application using the Release build. The debug DLLs are not, nor should they be, redistributable. Next, you can run the depends.exe utility to identify what DLLs your application requires. It will show you ALL the DLLs that are needed to...

Creating a task with a duration = sum of all tasks durations
Is it possible to have a task that has a duration equal the sum of the duration for a set of tasks and that has work for that task calculated automatically based on a formula of say number of hours per day times the number of days duration? Duration is not additive but work is. Imagine a summary task that has 3 subtasks, each of which lasts one day. If the three are in parallel, starting together, they all finish at the same timne and all work on the summary is complete since all work on its children is complete, The summary task duration is 1 day. But as to work, each subt...

Creating timelines that don't use time as the horizontal measureme
Is it possible to use the timeline functionality of visio without using time as the horizontal meter? I want to have the same functionality of a timeline, but use it to express events that happen over a range of values from 0-100. ...

How do I create a pictograph in Excel?
I am trying to create a pictograph in Excel, but I don't see it as an option on the chart wizard. How can I do this? Hi, You can use a picture as the fill effect. The Format dialog Patterns tab has a Fill Effects button. This allows you to select a image to use and also determine how that image should be display. Such as stretching it to the appropriate height or using the image per unit. For more information see Jon Peltier's explanation. http://peltiertech.com/Excel/ChartsHowTo/CustomStacks.html Cheers Andy ldimes4 wrote: > I am trying to create a pictograph in Excel, bu...

How do I create a donut chart in Excel
How can I import Outlook Calender months into Excel and create a donut chart? Can anybody help me? Thanks ...