CWinapp::onExitInstance - problems

this is about using a dll i have made in another language. called from
a MFC dll that has an instance of CwinApp

i have a dll i programemd in delphi.. it uses indyTcp server, it has
exported DLL methods to starting, and stopping the server
which including freeing classes etc, sets to true and

i am calling this dll from microsoft visual C++ (using loadlibrary,
get procaddress)
this is working fine, i can turn on the server, it behaves how i want,
and i can turn it off. and everything gets unloaded from memory fine,
if i call the turnoffserver methods in the delphi dll during teh
normal execution of the app

The problem i am having is my app that calls the delphi dll, is a
plugin itself (a dll)
and the host doesn't call any function to say (clean up dude)
so i rely on windows DLL unloading mechanism (which i do my using my
mfc Cwinapp::OnExitInstance()
however during this onExitINstance of the dll i notice certian things
just don't work (like showing a messagebox etc), and sadly my code
that is turning of the indy tcp/ip server, (well probably the code
inside indy actually).. so sadly the tcp/ip servercode doesn't get
turned off, and indy must keep some threads, and my main app cannot
get unloaded from memory (it the app seems to close, and its gone from
the list of applications, but the Process is still there.)

i don't know where i can unload this or how i can unload this.
klumsy (2)
6/18/2004 10:01:37 AM
vc.mfc 33608 articles. 0 followers. Follow

0 Replies

Similar Articles

[PageSpeed] 49


Similar Artilces:

Publisher Image Problem
whenever i copy/paste into pub2000, it brings up the "not enough memory" message. I've posted about this before, but you havent been able to solve my problem. i posted a reply to my original post after being told to disable the "script blocking" and "office plug-in", and my reply seems to have disappeared (no, I'm not seeing things). i also noticed someone else had the identical problem to me so i posted a reply there, as that person had been advised to do the same thing as me, and said the solution suggested didnt work. that reply too had disapp...

Problem opening e-mail attached Excel files
I have started having problems opening Excel files that come attached to e-mails when I double click on them in the e-mail or from the file page icon(when the attached Excel file has been saved). I am getting the following message: "Cannot find the file xxxx.xls(or one of its components). Make sure the path and file name are correct and that all required libraries are available." I have this problem from Zipped Excel files too. I do not appear to have the problem when I open them directly from Excel. Also, I do not appear to have any problems with other types of files(.doc, .pd...

Query Sort problem!
I am sorting a column by ascending, so how can I get the blank records/field to the bottom, so as I have ascending then blanks,seem to recall something about a flag???.....Thanks for any help...Bob In query design view, insert a new column to the *left* of the one you are sorting on, and enter this in the Field row: ([MyField] Is Null) Replace MyField with your field name. In the Sorting row under this choose Descending. -- Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Access users - Reply to group, rather than allenbrowne at...

problem with serializer constructor
Hi all, i'm trying to serialize a class. Using the constructor of XmlSerializer i get these (odd?) errors: "File or assembly name goseij9w.dll, or one of its dependencies, was not found". Everytime i run the testprogram it complains about another exotically named dll like et_kn-hl.dll or afeaqisr.dll. Even the example from msdn throws these errors. Anyone knows wuts wrong? I'll post the example code below. Thanks in advance, grtz, Mark <code> Imports System Imports System.Xml Imports System.Xml.Serialization Imports System.IO Imports Microsoft.VisualBasic Public ...

excell charting problem with false values
I have the following formula =IF(AND(BU2<$BU$1110,BU2>$BU$1111),BU2,"") chart shows 0's for false empty value "" I would like to skip false or format so that value doesn't get charted. Replace 'nothing' with N/A which gets ignored by chart. =IF(AND(BU2<$BU$1110,BU2>$BU$1111),BU2,NA()) best wishes -- Bernard V Liengme remove caps from email "Ricky Ray" <Ricky> wrote in message >I have the following formula ...

problems with Window.print()
Hello, We have a problem where the Window.print() command does not work from custom forms that are hosted from the isv.config file,After clicking the print button on the print dialog box, it displays the print icon on the internet explorer status bar, but does not send the output to the printer. Any ideas? ...

MFC menu problem
I can't seem to disable or grey out my menu items. I have two menu items that I want to disable temporarily. I tried setting the properties enabled = false and greyed = true, but they still work like they always did and are not greyed out. How do I fix this? Do I need to do this in code? Z.K. pMenu->EnableMenuItem(index, MF_GRAYED ); should show it disabled. -Seetharam Z.K. wrote: > I can't seem to disable or grey out my menu items. I have two menu items > that I want to disable temporarily. I tried setting the properties enabled > = false and grey...

Problem while installing Business Portal 2.5
While installing Business Portal 2.5 for Great Plains i get the following exception An unhandled exception of type 'Microsoft.BusinessFramework.Security.DatabaseAuthenticationProviderException' occurred in microsoft.businessframework.packager.dll Additional information: DatabaseAuthentication Provider GetConnectionString Failure: Failed to get connection string on provider: SQL Server DatabaseAuthentication Provider Failure: Failed to create connection string: QueryInterface for interface Microsoft.BusinessFramework.Security.IDatabaseAuthenticationProviderIdentity failed... Does a...

update patch cause business portal problem ?
i plan to apply following pacthes : Cumulative Security Update for Internet Explorer 6 for Windows Server200(KB928090) Security Update for Windows Server 2003 (KB918118) Security Update for Windows Server 2003 (KB924667) Security Update for Windows Server 2003 (KB925902) Security Update for Windows Server 2003 (KB926436) Security Update for Windows Server 2003 (KB928255) Security Update for Windows Server 2003 (KB928843) Security Update for Windows Server 2003 (KB930178) Security Update for Windows Server 2003 (KB931784) Security Update for Windows Server 2003 (KB932168) Update for Windows ...

Problems Retrieving Mail in Offline Mode in Outlook XP
I'm using Outlook XP trying to access Exchange Server. If I work in Online mode, I have no problems getting and sending messages. If I select Offline, I get two error messages. Task "Microsoft Exchange Server" reported error (0x80040111): 'The server is not available.' Task "Microsoft Exchange Server - sending and receiving" reported error (0x80070005): "You don't have appropriate permissions to perform this operation." Any help in this solving this problem would be much apprecaited!!! Thanks. BennyA ...

having serious problems
Hey everyone. I'm having a huge problem with my computer (which operates on vista) and am tearing my hair out over it. First of all, a nasty virus called 'security tools' infected my computer and i couldn't get rid of it because it wouldn't enable me to run real anti-virus programs such as anti-malwarebytes which has worked for me in the past. I do have solutions for getting rid of this virus now but i can't even boot up my computer properly. This morning when i booted up my laptop, startup repair tried to repair my computer but after not being able to fi...

Those who had Passport login problems...
Try again. A problem has been identified and corrected. Nope, still not working for me. (using Money 2001) >-----Original Message----- >Try again. A problem has been identified and corrected. > >. > Greetings, Cal! Thanks for the update! Indeed I have logged in Money04 all afternoon without a sign-in problem! I was wondering what was going on...prayerfully it is fixed! God Bless! Rick Yup fixed here too! I am very happy. I also downloaded 2-3 updates from the "Critical Updates" section (seemed like a month ago when I did ...

Problem with Queue
Is it possible to restrict certain ppl from the same business unit to view a queue. I only want a small team from the business unit to access the queue and pick up the task. Or do I have to assign the team to a different business unit. Please help me out. Thank you in advance. -- Thank you -rev- Unfortunately CRM doesn't allow different levels of privilege for Queues; a user can either read all Queues (regardless of Business Unit), or none You could use different business units to limit permissions to the activities in the queue. However, the user can still see them in the queue (...

_beginthreadex problem
I have been playing around and creating different kinds of views to put on tabs. The last thing I did was to derive a view from CDHtmlDialog, but this caused an error "error C2065 : '_beginthreadex' : undeclared identifier in class atlbase.h" I don't refer to any thread behaviour, I just created a new class and tried to compile. So I removed the new class and the error is still there, so adding my new class must have added code somewhere else as everything was fine before! Anyone any ideas? "GT" <> wrote in message ...

Problem decommissioning legacy 5.5 server from exchange org.
I am having some problems with an exchange 5.5 to 2000 migration. I have sucessfully moved all resources off the 5.5 server ( in a legacy NT4.0 domain ) and onto the E2K server ( in a new AD domain, full 2-way trust back to NT domain, both exchange servers in same org ) - Mailboxes, Public Folders, Connectors etc. I had setup multiple ADC agreements between AD and our legacy exchange 5.5 server, ccoexc01, which I have migrated to our exchange 5.5 OWA server in preperation for the decommissioning of ccoexc01, and AD user accounts etc have all been updated with exchange attributes. I use the M...

Probleme bei Adress=?ISO-8859-1?B?/A==?=bertragung zwischen Entourage und Outlook
Hi ich habe folgendes Problem: Ich m�chte gerne meine Adressen zwischen Windows Office Outlook 2004 und Mac Office Entourage 2004 �ber das Internet austauschen. Dabei nutze ich diese Funktion im Men�: als vcard weiterleiten. Das Problem hierbei ist, dass die Notizen in den vcards nicht immer vollst�ndig �bertragen werden! Ich kann auch keine Regel ausmachen, wann dies der Fall ist. Gibt es dazu irgendwelche Einstellungen die ich �bersehen habe? Oder ist dieses Problem bekannt? Gibt es vielleicht andere M�glichkeiten die Adressen mit Notizen (die sind wichtig) zwischen Win und Mac Office �be...

Having great problem with an C# application
Hello! We have a C#.ASP.NET application that runs on a IIS 6. The application contains actually several asp pages but there is no GUI. The application receive an xml file that is processed. There is also an MFC dll that is called from this asp application to make a syntax check on quite many commands. You don't have to know what a command is. The problem that we get is the following when the asp pages calls the MFC dll it will crash in such a way that the whole application pool on the IIS will be restarted. The IIS runs on a windows server 2003. We have added some rows in the MFC dll to ...

Stationery background image problem
Hi I have created stationery with below code. Previewing in IE, the background image appears as non-repeating and as large as its original size but when installed as stationery in outlook, in a new message it appears repeated and much smaller. What is the problem and how can I make the background image not to repeat? Thanks Regards Code ==== <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD><TITLE id=ridTitle>Esprit</TITLE> <META http-equiv=Content-Type content="text/html; charset=windows-1252"> <STY...

XMLDomElement problem (C++)
When I append one Element object to another and when for child I'm trying get pointer on his pather I get different address then orginal Element. I get of course Node pointer of parent but how can I change Node into Element ????? (DOM model of MSXML) ...

MFC Extension DLL problem
Hi, I created a DLL to make use of a preexisting MFC application. I want to use some dialogs, views and some other stuff from it. Except for some linker warning I got the dll compiled. If I now start using a dialog from the DLL I get an Debug Assertion Error, when exiting my client application. The Expression is: _CrtIsValidHeapPointer(pUserData) and the error was triggered in dbgheap.c . So, I assume I have a memory leak somewhere. Do anyone have an explanation for this? After researching a bit, it occured to me that I have two heaps, one for the DLL and one for my client application. I th...

Exchange backup disabled user
Hi all, We are running Exchange 2000 and Veritas Backup Exec 9.0 When a user leaves, we want to: Disable the AD a/c and stop the user from receiving mail, backup the mailbox, then delete it after 30 days (default retention period). We want to disable a user the day that they leave so they no longer have access to our network. The problem is though that we cannot backup the mailbox while the AD a/c is disabled. We would like to leave the mailbox in the backup schedule for 30 days so that it is backed up onto the tape which we store away once a month (therefore we always have a backup of...

Problems when saving worksheet into tab-delimited text file
I save a spreadsheet into a tab-delimited text file for later import into an Access database. One column contains text strings in which "comma values" can be found. Once save to the text file, those records that have commas in the Excel cells now contain double quotes (".....") at the beginning and end of the text string. As a result, during the data import into Access (and later comparison), the records are considered new and add records to tables. During testing procedures, I realized that replacing the comma with a semicolon would not add the double quotes when savin...

[Money2007] Cleared or Reconcilied and other font problem
Hello, what does they mean? What's the difference? Another question: in my Working budget I see strange characters (like squaes in the values of column % of income. Does anybody has this problem? Thanks In, Pippo wrote: >Hello, >what does they mean? > >What's the difference? Cleared means that the bank has that transaction recognize, such as a check having cleared. Reconciled means that you have checked that the cleared transactions add up to what the bank thinks they have added up to. Those were not "official" but just my rough des...

Office '04 11.3.8 Update Problem
When I try to install the update for 11.3.8 I get a message saying the Installer couldn't locate the correct version of the software required to install this update. the Read Me thing is a little confusing when I read it. why is this happening? How can I get it to stall the updates? thanks! Do you have 11.3.7 installed? This version is required for the 11.3.8 update; if you haven't installed that one yet, simply run Microsoft AutoUpdate (in your Applications folder) a couple of times to get all the updates you need. On 07/03/08 5:37, in article ee9012f.-1@webcrossing.caR9absDaxw, &q...

exchange 5.5 problem #2
When we send some messages to our outlook user s on an Ex 5.5. server we encounter the following problem. Message were send via the internet. Messages were bounced with error message "Unable to deliver the message due to a recipient problem" The strange thing we've seen is that the problem only pops up in a multi server site. Further we see all users on the primary server (with the Inter Mail Service) do recieve the email. All other users on the other servers don't recieve the message. The transport from the primary to the other servers is based the MS RPC protocol ...