|
Thanks Bob,
what i want . I am developing 2 application . one which monitor
no. of telephone line and store all lines information in one data structure
it may be linklist.
second application monitoring agent who is idle for
handling that call. as soon as agent free it retrive call information
which is stored by first application in linklist and route that to agent. and
delete that information from linklist.
i want to store information which is shared by both application. i read about file mapping but i don't want to use file or database.
please help me bob.
|
|
|
|
|
Hello,
So if your applications run on the same machine, this solution will work:
Create a DLL which can be used to store and retrieve the information. The first appication stores information and sets a signal or something so that the second application can retrieve the information.
If your applications run on different machines, you should use a middleware of some sort. You can try RMI, DCOM, CORBA, etc..
Hope this helps
Behind every great black man...
... is the police. - Conspiracy brother
Blog[^]
|
|
|
|
|
prashantarun wrote:
i know little bit about
IPC but i am still confuse.
Then you must be aware of things like:
Clipboard
Data Copy (WM_COPYDATA)
DDE
File Mapping
Mailslots
Pipes
RPC
Windows Sockets
prashantarun wrote:
if both application are running in seperate machine which method is best.
RPC, perhaps.
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
Thanks David,
but can you give me links through which we differentiate about this.
i.e advantages or disadvanges type of thing. Can you tell me what's
RPC advantages over other.
ThaNks
prashant
-- modified at 5:50 Thursday 6th October, 2005
|
|
|
|
|
prashantarun wrote:
but can you give me links through which we differentiate about this.
i.e advantages or disadvanges type of thing.
Start here.
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
I advocate using pipes. They can be used for processes on the same machine and on different machines. There is lots of information available about them too. Look for "named pipes."
|
|
|
|
|
HI friends,
I just want to share this code with you people as when I was in need I could not find it anywhere.
hope it may help you some time.
cheers !
BS.
// This is a part of code to get the listing of all files in the
// specified directory
// Dont forget to add the following line
#include <windows.h>
// and then use the following code in the main() or any function
void getDirectoryListing(void)
{
WIN32_FIND_DATA FindFileData;
HANDLE hFind;
// Path of the file to find. It can contain wild card characters(* or ? )also
char folderName[] = "e:\\someFolderName\\*.*";
hFind = FindFirstFile(folderName, &FindFileData);
if (hFind == INVALID_HANDLE_VALUE)
{
cerr<<"\nFolder is empty";
}
else
{
cerr<<"\n"<
|
|
|
|
|
intelligent_pb wrote:
...when I was in need I could not find it anywhere.
That makes me wonder where it was that you were looking. Your code snippet is one of the most common pieces found on the Net.
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
hi!!
i am new to mfc. i hav a SDI application. i had deleted the default menus and now i want that on clicking a particular menu item, a dialog is opened. how to do it?
can anybody tell me in detail??
thanx
|
|
|
|
|
if u mean that u want to open a dialogbox
use ur dialogbox class to create an object
then use the DoModal memeber function to
bring live ur dialog
CDialogBox dlg;
dlg.DoModal();
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
vikas amin's post is good. If you're really new, you may need this as well. Each menu item has a certain ID associated with it. You'll see that when you right-click on that item and choose properties. Now in the Wizard Bar, choose the appropriate class in the far left drop down list. Then, in the next drop down list you'll see a list of IDs. The ID of your desired menu item should be there. Select it and press the Wizard Bar action button, or just double click the menu item ID, and a function will be created for you (e.g. OnFileNew()). That's where you want to put your Dialog initialization and call.
Danny
The stupidity of others amazes me!
|
|
|
|
|
When I read files with signs å, ä, ö I got strange characters like “ã-“ and so on. Do I use the wrong enconding type and how do I change that?
_____________________________
...and justice for all
APe
|
|
|
|
|
It seems that the textfile you're reading is UNICODE/UTF-8. You will have to take that into account, or reencode the file into some codepage. Windows 1250-something has å, ä, ö. I think. ISO-8859-1 (and -15) has them too.
--
|
|
|
|
|
Hello (Hej.)
My guess is that you read a text file, written in another charset than ANSI, probably a PC-8 (DOS) charset, CP 437 or 850.
Use the Windows func OemToAnsi to convert the text lines from the file to ANSI. And from there, do another conversion to Unicode if you whish.
You might also to considder the opposite character conversion func, AnsiToOem.
Use them as they are, or use them as member functions in a CString.
|
|
|
|
|
Hi,
I am developing hook application, which will create a file whenever the user do any SAVE_AS operations on any IDE (notepad, visualstudio...).
I can be able to get the save_as name (new name) for all applications EXCEPT Microsoft office packages(microsoft word, excel, frontpage...).
How could we get the save_as name when user do any save_as on this (microsoft word, excel...).
Please any help.
Be simple and Be sample.
|
|
|
|
|
You'll need to get real low-level for this. See here for an explanation of how others have monitored file activity.
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
Hi
I have the following code to change the balloon tooltip text.
SetToolTipText("zzzzzzzz");
Sleep(5000);
SetToolTipText("xxxxxx");
Sleep(10000);
SetToolTipText("yyyyyyy");
If there already balloon tooltip displayed(from other application) before I launch my application, Tooltip sequence will be
zzzzzzz
yyyyyyy
xxxxxxx
otherwise it will be
zzzzzz
xxxxxx
yyyyyy
Can anyone aware of any solution for this?
|
|
|
|
|
Hi,
I'm dealing with some automation for my code, and there is some syntax that is there that confuses me
I have code like this:
BEGIN_DISPATCH_MAP(MyDocument, CCmdTarget)
//{{AFX_DISPATCH_MAP(MyDocument)
DISP_FUNCTION(MyDocument, "SetVisible", SetVisible, VT_EMPTY, VTS_BOOL)
//}}AFX_DISPATCH_MAP
DISP_FUNCTION(MyDocument, "SetInvisible", SetInvisible, VT_EMPTY, VTS_BOOL)
END_DISPATCH_MAP()
The part i dont understand is why the AFX_DISPATH_MAP line is commented out? And why all code between the AFX_DISPATH_MAP lines is a different colour (grayed out in VS2003). This functions must still work as they do in fact work, but what would the differrence be between the SetVisible and SetInvisible method calls. This style of commenting out the AFX_DISPATH_MAP lines is present in sample code at MSDN, but i cannot find an explanation for it? In the example above, what in fact is the difference between the two differing lines referring to dispatch functions? How do they behave differently, if at all, etc
Many thanks
Will
|
|
|
|
|
(I am working with VS 6.0)
commented code //{{AFX_DISPATCH... is only mark for class wizard and if You delete this lines You will be in troubles with this wizard and its automation tab Real dispatch macros are BEGIN_DISPATCH_MAP, END_DISPATCH_MAP and some other (look into MSDN, there are lot of articles about this topic)
Next, every properties and methods added by wizard are placed between these commented lines
//{{AFX_DISPATCH_MAP(MyDocument)
DISP_FUNCTION(MyDocument, "SetVisible", SetVisible, VT_EMPTY, VTS_BOOL)
//}}AFX_DISPATCH_MAP
ANd because this, I think, that method DISP_FUNCTION(MyDocument, "SetInvisible", SetInvisible, VT_EMPTY, VTS_BOOL) was added later by hand (You can do like that with your other methods and properties, but then you can not manipulate those members by class wizard)
br
Jozef
|
|
|
|
|
Is there a limit to the number of timers that i can have in an application? If yes how many? Is it limited by the duration of each timer or is it just a max number?
|
|
|
|
|
I think that the only limit is the cpu performance. I mean, as much timers you add, the performance of the cpu will decrease.
Marc Soleda
... she said you are the perfect stranger she said baby let's keep it like this... Tunnel of Love, Dire Straits.
|
|
|
|
|
It is worth seeing if you can use one timer to handle several functions, e.g a 0.5sec function could processed on every tenth call to a 0.05sec timer.
Elaine
The tigress is here
-- modified at 7:28 Wednesday 5th October, 2005
|
|
|
|
|
As far as i know the only limit is
the CPU performance , as everythimer
thread in an O.S will use some resources
at some excess limit the resources are bound
to be extinct
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
nripun wrote:
Is there a limit to the number of timers that i can have in an application?
Yes, timers are a limited global resource.
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
No global resource is unlimited. To see how much you can create, you should write a program that just creates timers and reports the number of timers created when an error occurs...
Behind every great black man...
... is the police. - Conspiracy brother
Blog[^]
|
|
|
|