|
If you're using CORBA then using the active object pattern shouldn't be too hard a concept to grasp. You can think of a CORBA object as an active object running in another process/on another machine.
One option you might have might be to stick the long running stuff in their own processes and use CORBA, although you'll loose a bit (a lot?) of efficiency that way. It could save you the balls ache of implementing the active object pattern though and all the other problems you have with multiple threads although if you're using a lot of complex types in the interface marshalling might be hell.
Cheers,
Ash
|
|
|
|
|
Hi Ash,
I appreciate your interest in helping me. I am still finding a hard time to solve this. May be I am not smart enough to design this properly.
I went through the pattern. Even with this active object, if I have to make synchronous calls, the client must be blocked till the message is received. Or may take time some where in client also.
Consider this: (simplified for reading)
When I start an operation, My application performs following..
1. Connect to server (may take 2 secs)
2. Create a GUI for showing some data (milli secs)
2. Get data (RMI) (40 secs)
3. Update GUI (milli secs)
5. Based on the above data start creating next GUI.
6. Create next GUI.
6. Get modified data for second GUI. (RMI) (4 mins!)
7. Update second GUI
Till now these are sequential in my application. User can always create n number of GUIs. Each GUI creation and updation may require n RMI calls and they are synchrounous. Meaning, each RMI call is blocked till it is received and the marshalling args are huge. I may also get MBs of data.
Example: Consider following call stack.
DataIDL::GetData() // Use proxy to get data. Blocked till the data is fetched.
Glyph::GetData() // After glpyh creation
GlyphsHandler::Execute() // Creates Glyph get data and Update Glyph
Doc::Execute() // Execution start of all Glyphs
Doc starts Execution. Glyphshandler creates glyphs, gets data and updates glyph. It goes on for all glyphs. Now as it all sequential, I cannot decouple each IDL call to threads as the next call depends upon previous call's data.
Hope I am not taking too much of your time. Is it possible to asynchronously decouple the IDL getdata using active object so that the next call will have no effect?
Many thanks for your advices till now.
Murali Krishna
|
|
|
|
|
Not sure if this will be of help to you, but if you're using SendMessage from one thread to another, you can use the ReplyMessage API to achieve concurrency.
|
|
|
|
|
Hi all,
I have faced an amazing problem.
Please go through below steps to reproduce:
1. create two folders ex. new1 & new2 on D drive.
2. create one short cut of folder new1 like "Shortcut to new1" on D drive only.
3. Rename "Shortcut to new1" to "new2"
4. Execute below code
ShellExecute(GetSafeHwnd(), NULL, L"D:\\new2", L"", NULL,
SW_SHOWNORMAL);
Actual Results : It opens folder new1 from D drive.
Expected results : It should open folder new2 D drive.
|
|
|
|
|
Howdy.
It's a very simple fix. The outcome kinda makes sense too, to me.
Anyhoo, just try this instead -
ShellExecute(HWND_DESKTOP, NULL, L"C:\\new2\\", L"", NULL, SW_SHOWNORMAL);
|
|
|
|
|
|
you rename shortcut name , it dose not matter.
because if you change the shortcut name but it still target old one.
so you want to change target then you do
right click on shortcut --> select property -> change target path
|
|
|
|
|
Hi
I have a app which it build by VC++.When running it in my computer show message
This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem.
but run it other computer fine it.
My Computer have a C++ 2008 Redistributable.
Help me
|
|
|
|
|
reza toorani wrote: My Computer have a C++ 2008 Redistributable.
You need to install the redistributable package on the target computers too. You can download it from here[^]
|
|
|
|
|
I install redistributable package but give me error message
|
|
|
|
|
you have mixes version of the dlls. The installed dlls are others than the building dlls. Use the service pack level and/or check the manifest.
tip: dependency walker
Press F1 for help or google it.
Greetings from Germany
|
|
|
|
|
Thanks
I download Dependency Walker files and load .exe appliaction file.error MSVCR80D.DLL file.
I download this file and copy the root application.but give me error message.
|
|
|
|
|
Do you see the big fat "D" in the dll name. It is a debug build.
Press F1 for help or google it.
Greetings from Germany
|
|
|
|
|
the dll name is DT.dll
I think that "d" is for dll name.
If it is a debug build,What do I?
|
|
|
|
|
Ypu wrote "I download Dependency Walker files and load .exe appliaction file.error MSVCR80D.DLL file."
that means your app or some dlls is referring to a debug dll. You need a release build of that file.
Press F1 for help or google it.
Greetings from Germany
|
|
|
|
|
this application fine work in other computers.
|
|
|
|
|
If depends.exe says that your application links to MSVCR80D.DLL , it means that the application is a debug build.
Do you have Visual Studio 2005 installed on the computers where the application run properly, but not installed on the computer where it doesn't starts?
Remember that the debug versions of the C/C++ runtime libraries are provided with Visual Studio but they are not redistributable.
|
|
|
|
|
Hi sir,
I am trying to write a text into Bitmap,i am able to write.
But i am not able to fill the colur into the region where i am writing.
i.e the colour of bitmap and the text which i am writing is not matching.
Here is my code:
OnPaint()
{
CPaintDC dc(this);
CDC dcImage;
CRgn* rgn;
BITMAP bm;
if (!dcImage.CreateCompatibleDC(&dc))
return;
m_bitmap.GetBitmap(&bm);
CBitmap* pOldBitmap = dcImage.SelectObject(&m_bitmap);
CBrush mybrush(RGB(255,0,0));
dcImage.TextOut(521,95,"Testing");
rgn=new CRgn;
rgn->CreateFromPath(&dcImage);
dcImage.FillRgn(rgn,&mybrush);
dc.BitBlt(0, 0, bm.bmWidth, bm.bmHeight, &dcImage, 0, 0, SRCCOPY);
dcImage.SelectObject(pOldBitmap);
}
Any idea will be helpful
Thanks
Raj
|
|
|
|
|
From CRgn::CreateFromPath documentation [^]:
The device context identified by the pDC parameter must contain a closed path.
Please have a look at the following code sample [^].
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
I suggest you to check return values of the functions like CreateFromPath to see if the function call has failed or not.
|
|
|
|
|
Hi,
How to draw a tranparent rectangle with my selected pen?
|
|
|
|
|
I'm not certain exactly what you are trying to do but you may find the FrameRect[^] function suits your purpose.
It's time for a new signature.
|
|
|
|
|
Select the NULL_BRUSH into the device context and use the Rectangle function.
|
|
|
|
|
Why do you want to draw it if it's transparent ?
Seriously... have a look at CDC::SetBkMode (have not tried it).
Watched code never compiles.
|
|
|
|
|
Maximilien wrote: Seriously... have a look at CDC::SetBkMode (have not tried it).
Nope. Thats only for text.
...byte till it megahertz...
|
|
|
|