Re: server and client threads #2

On 2/3/2005 1:48 PM, RSN_@_COMCAST.NET wrote to ALL:

-> When you spawn the child thread you ordinarily pass it a parameter.
-> What I do is make that parameter a pointer to the instance of the
-> server class that spawned the child.  That way, the child can easily
-> notify its parent about any special events that may be useful.
-> Termination is one such case!  I also find it very useful to send a
-> stream of diagnostic and debugging information to the parent who can
-> display it, log it, or ignore it depending on circumstances.

Good point.  Now since my server thread doesn't have a message pump because its
a worker-type thread, I guess the functions that the client would invoke on the
server instance could be written thread-safe and executed in the client's
thread rather than having the client post a message to the server thread and
then having a queue/message pump handle the notifications, right?

Chris 
0
2/3/2005 7:45:51 PM
vc.mfc 33608 articles. 0 followers. Follow

1 Replies
434 Views

Similar Articles

[PageSpeed] 0

On Thu, 03 Feb 2005 14:45:51 -0500, chris.cranford@tkdsoftware.com
(Chris Cranford) wrote:

>On 2/3/2005 1:48 PM, RSN_@_COMCAST.NET wrote to ALL:
>
>-> When you spawn the child thread you ordinarily pass it a parameter.
>-> What I do is make that parameter a pointer to the instance of the
>-> server class that spawned the child.  That way, the child can easily
>-> notify its parent about any special events that may be useful.
>-> Termination is one such case!  I also find it very useful to send a
>-> stream of diagnostic and debugging information to the parent who can
>-> display it, log it, or ignore it depending on circumstances.
>
>Good point.  Now since my server thread doesn't have a message pump because its
>a worker-type thread, I guess the functions that the client would invoke on the
>server instance could be written thread-safe and executed in the client's
>thread rather than having the client post a message to the server thread and
>then having a queue/message pump handle the notifications, right?
>
There are a variety of techniques.  One is to go all the way back to
the main application which does have a message pump and which probably
spawned the server thread to start it all off.  The client thread
could call a function in the server thread class which, in turn, posts
a message to the main application.  If you have to pass a lot of data,
you could have the function push a data structure onto a list in the
main application and then post a message saying data is available.
The main application then pops the message off the list.  The list of
active clients would be maintained by the main application, which then
would have the ability to display them on demand.


0
r
2/4/2005 1:32:45 AM
Reply:

Similar Artilces:

Any word on CRM 1.2 release date?
Has anyone heard a firm release date yet for CRM version 1.2? And will CRM 1.2 work with SBS2003 that was just released? -kw "Jim" <jim@nospam.com> wrote in message news:ehxGoPvnDHA.644@TK2MSFTNGP11.phx.gbl... > Has anyone heard a firm release date yet for CRM version 1.2? > > This depends on where you are based. I've just got home from an MS course, and we told that in Australia it will release to the partners at the conference late next month, and will be released to customers on 12/1/04. It was also confirmed that it will run on SBS2003 - it will ru...

2 Questions on Pivot Tables
Any assistance appriciated. (Excel 2003) 1) I have a simple Pivot table showing 6 groups with their totals and a subtotal eg: America 10 UK 15 Oz 22 etc. Grand Total 125 I want to Pivot Graph this data, no problems. I want however an extra line to show the total on the Secondary Axis. I have almost got it by placing the column in a second time as a Running Total and then as a Line on my chart, hiding all the values until the last point. However I would like if possible the Total as a horizontal line across the chart? 2) I h...

Page set up #2
I want to use the paper size of A3, but cannot find it in the paper options. Anyone know where I can find it? Check your printer properties and preferences. If the printers you have installed won't handle A3 you won't have it. And you will need to "install" something that will. Even a "PDF" file printer will do. Alan Badgery wrote: > I want to use the paper size of A3, but cannot find it in the paper > options. Anyone know where I can find it? I've just a home use computer, but the intention was to use the work book between and home and work, w...

Monitoring Exchange 2003 #2
Hello, We are planning to implement MOM 2005. However, we are also concerned about implementing auditing for changes made within ESM. Will there be a tool that will allow management to know a change was completed by a specific UserID? When a mailbox store is dismounted - who dismounted it/date/time? When a change is made to the RUS - who made the change? Thank you, Exchange2003 MOM does not have the ability to monitor this in the shipped Management Pack. You can enable AD auditing on the domain controllers: http://support.microsoft.com/default.aspx?scid=kb;en-us;314955&sd=tech. ...

smtp addresses #2
Exchange 2000. I have 2 smtp addresses under recipient policy. smtp: username@domain.com (set as default) smtp: username@local.domain.com These were created automatically when we migrated from exchange 5.5 to 2000. local.domain.com is our internal domain. domain.com is our Internet address. I unchecked local.domain.com address, and "Apply this policy now", but it did not remove them from each users AD account. So I deleted the local.domain.com address, and "Apply this policy now", but it still did not remove them from each users AD account. We are getting NDR's b...

Exch. Server in Child Domain
Can a Parent Domain's public folders be synched to a child domain's exchange server? Sure as they are all in the same Exchange org. Nue "Dan Klinge" <Dan.Klinge@NOSPAMJERKArborMed.com> wrote in message news:uRS2KYKOGHA.2012@TK2MSFTNGP14.phx.gbl... > Can a Parent Domain's public folders be synched to a child domain's > exchange server? > On Thu, 23 Feb 2006 10:26:37 -0800, "Dan Klinge" <Dan.Klinge@NOSPAMJERKArborMed.com> wrote: >Can a Parent Domain's public folders be synched to a child domain's exchange >serve...

Exporting emails from Outlook 2003 #2
I have a folder that contains over 500 threads on technical matters on a subject. I have tried to use Export to Exel but this does not transfere all the information over including not giving all the text in the body of the email. A similar problem is saving an email to a folder outside outlook it doesn't show the date so you may have a huge list of items all titled but not dated in the title Please can anybody help? Hi stevtb why do you want to export the emails. What is the target/reson to export the emails? -- Oliver Vukovics Share Outlook without Exchange (Vista Ready): Publi...

Problem
Ever since I added a Microsoft Exchange Server Account and all it6s associated folders and its in-box to my pre-existing Personal Outlook 2003 POP3 folders, I have had nothing but confusion. The Exchange Server account from my workplace downloads its messages into the in-Box for my private ISP POP3 account and vice versa. When I try to configure a rule for my personal POP3 account so that any messages addressed to my workplace account are loaded into the exchange server in-box on my client PC, the software tells me I have to go on-line to Exchange Server - even to create rules for th...

SRM 3.0 for SBS
Trying to "test" install CRM 3.0 for SBS on a SBS 2003 Premium R2 server. Installation gives option to install a sql Report Server or use existing. The one it tries to install is SQL 2000 and the screen says it is not compatible with other versions of SQL. So will the install allow you to connect to the SBS 2003's SQL 2005 Workgroup Report Server? Can;t find this answer anywhere! Thanks, KBB In answer to your first question, yes. You have to install SQL 2005 Reporting Services, then connect to this during CRM setup "KBB" <kbbnospam@dontspamme123.org> w...

training #2
Is there a class offered on Publisher and if so will it ever come to Ohio? Thanks Lots of good training articles available on the Office site. http://office.microsoft.com/en-us/training/CR061832741033.aspx Where in Ohio? -- Mary Sauer MS MVP http://office.microsoft.com/ http://msauer.mvps.org/ news://msnews.microsoft.com "Cindy Taylor" <anonymous@discussions.microsoft.com> wrote in message news:0ed301c4f293$82579a30$a501280a@phx.gbl... > Is there a class offered on Publisher and if so will it > ever come to Ohio? Thanks On Tue, 4 Jan 2005 19:06:21 -0500, "...

Event ID c0072030 #2
We have an Active Directory Organizational that contain all of our contacts. I have run the delegation of control wizard and given a user full control over the contacts OU. When I log on with that users account and try to update to add an SMTP address to a contact I receive the following error: There is no such object on the server Facility:Win32 ...

Outlook not opening #2
I recently installed Outlook. When I try to open it, I get the error message "Outlook requires Outlook Express 4.01 or greater". I do have OE 5.0 installed. Why am I getting this error? ...

List Boxes #2
Can someone tell me how to correct the following code so that both columns in the listbox will be updated? Only the first column distplays Dim MyArray() ReDim MyArray(mycount, 1) usrGLDist.lstOutput.ColumnCount = 2 For i = 0 To rst.Count - 1 MyArray(i, 0) = rst.Value("descr") MyArray(i, 1) = rst.Value("pcamt") rst.MoveNext Next i 'Load ListBox1 usrGLDist.lstOutput.List() = MyArray Richard wrote : > Can someone tell me how to correct the following code so that both > columns in the listbox will be updated? Only the first col...

How can I line up 2 columns with similar information?
I have 2 columns with names in each and I'd like to line them up next to each other. I think we'll need more information, Kathy. I don't understand what you're trying to do. Can you give exactly what's up? ************ Anne Troy www.OfficeArticles.com "Kathy" <Kathy@discussions.microsoft.com> wrote in message news:A5C0BC96-7E27-4C55-89A3-03513FC0D409@microsoft.com... >I have 2 columns with names in each and I'd like to line them up next to >each > other. Column A has employee number, Column B has the same employee numbers but has addi...

Lost Product Key #2
Wanted to install my publisher deluxe 2002 onto my new computer. I've lost my product key. What can I do? How do I do it? Whistle Britches wrote: > Wanted to install my publisher deluxe 2002 onto my new > computer. I've lost my product key. What can I do? How do > I do it? ================================= Have a look at the following KB article: (823570) How to Obtain a New Product Key for Office Program Setup http://support.microsoft.com/?kbid=823570 -- John Inzer return e-mail disabled ...

CRM 3.0 Web client performance questions
Hello - I seem to have a bit of a connundrum here and was wondering if anyone else has experienced a simmilar issue. We've currently got CRM 3.0 up and working but I have gotten some questions regarding performance from some of my users that access CRM using the web client on a WAN link. They are overseas and the server is located in the US. They've got a 512kb connection and we've got a full t-1 connection. They are stating that it can take them anywhere from 30 seconds to 2 min to load a page. So, I had them do some investigating and testing with some other machines ...

How do I make a particular column required in Excel? #2
Our NPO is creating a reimbursement chart in Excel. We're trying to make it so that if employees do not fill in one particular column entitled "Projects," they will get an error or will be unable to have a final sum filled in. Is there any way I can make this particular column required so that if it is not filled in, the chart will not complete properly? Thank you in advance for any advice or help--I'm a bit of a novice to this! ...

help with lookup formula (sheet 2, not a double post)
I need to make a formula using a lookup. The first spreadsheet is a inventory (ALO INVENTORY JP). The second (P&G 103) is a chart tha tells number of gallons of alcohol per foot/inch/fraction. On ALO INVENTORY JP I insert the # of feet, inches, and the fraction i cells R5 and T5. I want these numbers to lookup the number of gallon off of the P&G 103 worksheet. For example: P&G 103 (on inventory sheet) is 26ft 4 1/2 inches, i should look-up to be 34572 gal. for the 26'4" and 55 gal. for the 1/2" These two numbers should be added together and multiplied by the numbe ...

RMS POS 2.0 SP1 fails to install
We are running RMS 2.0, and when I tried to install POS SP1 I get the following error" The expected version of the product was not found on your system" I have searched kb and found nothing that may address this. Any ideas would be appreciated. Thanks Sounds like you got the wrong service pack. POS is a different product. You need RMS 2.0 Service Pack 1. Marc "Davidjc52" <Davidjc52@discussions.microsoft.com> wrote in message news:EE74C3F9-0CF6-4693-889C-8CD301CA691F@microsoft.com... > We are running RMS 2.0, and when I tried to install POS SP1 I get the &g...

Transfering to new EXCH Server.
We are trying to transfer to a new Exchange 2003 server so we can reformat the old machine. Mailbox transfers are complete and the new box is hooked up internally and to our outgoing IP. I am able to receive mail from outside the network, but all outgoing mail is stuck in the queue. I have set the Virtual Smtp server to all unassigned, and I have nothing in routing. Im not very familiar with these settings. Is the problem the old exchange server? Is there a way to remove it without uninstalling exchange from the old machine? My non deliverables come back with this error message. ...

Outlook Opens looking for Exchange Server
A computer club member wishes to used Outlook so that she can sync with her Palm. Environment: Windows XP Pro SP2, IE 7, Windows Genuine Advantage installed. Symptom One: When Outlook is opened, the program is looking for Exchange Server. She is using a laptop with no exchange server available. Symptom Two: When performing Office Update, three items did not install all with error code 0x8024402C: 1. Update for Outlook Junk Mail (KB943591) 2. Office 2003 update SP3 3. Security Update for CAPICOM (KB931906) I suspicion that Office 2003 is a 60 day trial that has never been activated. Are ...

Restoring Public Folder to a Recovery Server
Hello, We have exchange 2003. We restored our PUB folder database to a recovery server (separe forest). We are able to mount the database but how can we acess it. We know exmerge will not work in this case and we tried installing outlook client but we can only see the default Public folder database. Thanks in advance Hi, "xmis1" <xmis1@discussions.microsoft.com> schrieb im Newsbeitrag news:6FCB9C1E-1D51-4FCA-9F82-6A3B85DFB510@microsoft.com... > Hello, > > We have exchange 2003. We restored our PUB folder database to a recovery > server (separe forest). We ar...

MFC Registry Access in Automation Servers (EXE)
I have written a MFC server application (MFC automation server). Some configuration settings are saved with WriteProfileInt /WriteProfileString to the registry. I used SetRegistryKey("Mycompany") for the registry path. The application works fine under different users. Now this application is started as embedded server via my ASP code from the IIS. The machine is a Windows 2003 Web Edition Server. For this case the DCOM and IIS settings uses a predefined user for the ASP code and the COM server. If I start the app per hand now under this user everything is going well. But if the app ...

SMTP Security #2
Does any know what is the Best Practice for Securing SMTP is? and More importantly do you have the documentation to implement it? http://support.microsoft.com/default.aspx?scid=kb;en-us;193922 http://support.microsoft.com/default.aspx?scid=kb;en-us;324059 http://support.microsoft.com/default.aspx?scid=kb;en-us;319356 http://support.microsoft.com/default.aspx?scid=kb;en-us;836500 Austin Morgan wrote: > Does any know what is the Best Practice for Securing SMTP is? and More > importantly do you have the documentation to implement it? > > You could configure SMTP mail rel...

MS Exchange Server
I do not have Outlook installed on my home computer, which has WinXP installed, but I do at work so I am somewhat familiar with it. Recently whenever I try to click on a "Contact Us" link in a web page, a window opens for MS Exchange Server. I am pretty sure that has something to do with Outlook, but I do not think it has anything to do with Outlook Express. Why has this started happening and how do I remove it. I cannot use the "contact us" function on Any webpage. Thanks mmobilman In IE go to Tools - Internet Options - Program Tab and make sure your desired email p...