|
Why reinvent the wheel? How about just using NetServerGetInfo(..., 101, ...) ?
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
For the most part, I work in a bubble and can usually work things out over time. However...
I have a Client/Server application using DCOM where I would like a client to signal the server that it is done with certain operations and now notify all other clients of changes and updates. The notification message is short - a Client ID and a BSTR (< 255 characters) and the client's response is typically short, quickly returning an HRESULT to the server. I am able to make "Connection Points" work fine for two or three clients. When more clients are connected though, things bog down.
Correct me if I am wrong, but COM is sychronus which means that all clients must be notified via a Fire_XXX function before returning to the originating client. This turns out to be well over a minute in some cases! Users believe the program has locked up and take matters into their own hands (torches, clubs, pitch forks - storm the castle).
I have setup the notification method on the server side to bracket the call to the Fire_XXX function in a secondary thread allowing quick return to the client requesting notification. This works much better, but I am unsure if this is the best approach.
I have being trying to find information on "Loosely Coupled Events" without much success. Any guidance or suggestions would be greatly appreciated.
Ross
Ross White
|
|
|
|
|
Greeting, we are college students from Taiwan, here have some problem and wish to get help here, thank you for your reading and answer.
We wish to create a human-face image on PDA, and now we separate the face into some individually images, like hair, eyes, nose and mouth...
Our goal is to treat all the individually images as particular objects, and could drag them into a main working space (a larger image place), then could save them into a single image files.
1. How to control the object with the code that could move and transform the object feely?
2. How should we design the program to let the user could draw and to alter the images like in painter?
3. Would anybody please tell us where could we inquire about the information about GPRS upload program?
The program coder we use is EVB; we sincerely wish you could help us.
|
|
|
|
|
i want to find a library about wav convert to midi(language : c++)for windows 2000.
|
|
|
|
|
learn the theory about sound storage then you will see how silly your question is!
Don't try it, just do it!
|
|
|
|
|
|
Hy!
I have a project and I must simulate operations on Binary Search Trees.
I have a problem animating some rectangles (moving them around an displaing them as they move).
Can someone tell me how to do this?
cata
|
|
|
|
|
How do you find a programs memory allocation? Like if we wanted to hook a game by injecting a .dll file into the memory, we need the memory allocation, do you need to debug or something, please give directions
|
|
|
|
|
Opwar wrote:
How do you find a programs memory allocation?
See if this article helps. If not, I'm failing to understand your question.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
I have created a single document application with MFC wizard. I want to capture file name being opened when user selects a file and opens it through the file open dialog box. How can I do this?
Thanks
|
|
|
|
|
CDocument::GetPathName() after document is opened
You can override CDocument::OnOpenDocument() to do the open--I've done this many, many times. (I suggest overriding this, calling the base class, then stepping through the code to understand what the base class is doing [with dirty flags and all that.])
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
|
Hello. I have tried to build my project which references msxml4.dll but when I try to build it I get the following error:
Cannot open type library file: 'msxml4.dll'
I can manage to find this on the Internet I think but should I just put it somewhere in my path or is there a proper way of installing it along with maybe an SDK? I have tried installing the Internet SDK but it does not install the file I want. I have tried searchig for it on my hard disk after installing the SDK but it is not there.
Thank you for any help.
|
|
|
|
|
Where/how are you referencing msxml4.dll?
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
Thank you for your reply.
It is in my stdafx.h file but I have been looking for information and I have seen that it is provided as part of the operating system I think. I think my problem is that I am on Windows 2K so the version is not the one I am making a reference to. I have changed it now to msxml3.dll and it now builds. I wonder how easy it is now to upgrade to msxml4.dll. Is this just installing MS XML Parser 4.0?
|
|
|
|
|
Hi,
I would like to know if there is any function (while reusing the webBrowser control) that give me the ability to add headers in every request that makes my application using the webBrowser control.
I would appreciate any help..
Thanks in advance!
-Manos Moschous
|
|
|
|
|
why nobody answered in my question....???
please any help..??
Thanx
|
|
|
|
|
Can someone show me an example of how to use a critical section object, EnterCriticalSection, etc. Just a simple example is fine.
Jerry
|
|
|
|
|
read the SDK
Don't try it, just do it!
|
|
|
|
|
CRITICAL_SECTION m_criticalsection;
InitializeCriticalSection(&m_criticalsection);
EnterCriticalSection(&m_criticalsection);
..
..
LeaveCriticalSection(&m_crticalsection);
hope it makes sense
i can't even remember what my point is now, but anyway, i'm correct
Barring unforeseen acts of God and Adminstrators, my server will be up tomorrow. I'm more worried about the Adminstrators.
|
|
|
|
|
class CriticalSection
{
private :
CRITICAL_SECTION cs_ ;
public :
CriticalSection ()
{
::InitializeCriticalSection ( &cs_ ) ;
}
~CriticalSection ()
{
::UninitializeCriticalSection ( &cs_ ) ;
}
operator CRITICAL_SECTION* ()
{
return &cs_ ;
}
} ;
class CriticalSectionGuard
{
private :
CRITICAL_SECTION * pcs_ ;
public :
CriticalSectionGuard ( CRITICAL_SECTION * pcs ) : pcs_ ( pcs )
{
::EnterCriticalSection ( pcs_ ) ;
}
~CriticalSectionGuard ()
{
::LeaveCriticalSection ( pcs_ ) ;
}
} ;
class SharingSomeResource
{
private :
CriticalSection cs_ ;
...
public :
SomeMethodRequiringSynchronisation ()
{
CriticalSectionGuard csg ( cs_ ) ;
}
...
} ;
Above not compiled so probably rife with typos. Also not considered copy construction and operator=, as one ought. But should give the general idea.
Paul
|
|
|
|
|
Hi,
I have a child window that can only be sized by integral multiples of a given size.
I would like to have the parent window leave exactly enough room for the child window but cannot find a successfull way of doing it.
I have tried handling WM_WINDOWPOSCHANGING on the parent, resizing the child, and then getting the updated child dimensions, but that doesn't work as expected.
Any ideas?
Cheers.
--
Maxime Labelle
maxime.labelle@freesurf.fr
|
|
|
|
|
Try handling the WM_SIZING message of the parent. The LPARAM is a pointer to a RECT structure that you fill to represent the size of the window.
Inside the handler, once you determine the proper client size, try using the AdjustWindowRect API to set the RECT structure. I've never used the API myself so I'm not sure of the intricacies, I just came across it recently in MSDN.
From MSDN: "The AdjustWindowRect function calculates the required size of the window rectangle, based on the desired client-rectangle size."
It takes the window style and a menu-present flag as input. You may have to do some additional calculations if your window has toolbars.
Hope this helps. Sorry I'm not more familiar with the API, as I said, I just came across it last week, but it seems like a useful one in your case.
|
|
|
|
|
Hi,
Thanks for the ::AdjustWindowRect() API that I was not aware of. It makes things a little less clunky to actually calculate the required client area.
However, the problem doesn't lie in the calculation of the required client area. The problem is to actually update the size of the parent window by constraints on the size of the child window. Handling the WM_SIZING message as you suggest does not seem to work for me...
--
Maxime Labelle
maxime.labelle@freesurf.fr
|
|
|
|
|
Maxime Labelle wrote:
Handling the WM_SIZING message as you suggest does not seem to work for me...
What behavior are you seeing?
- Nothing happening
- Resizing to an unexpected size
- Moving to an unexpected location
- something else?
|
|
|
|