|
hi!
i understand the points , which u had told me. but, i hav to write a program for it using mfc. could u please help me out??
thanx
|
|
|
|
|
Which part exactly are you needing help with?
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
Hi
actually, i need help on which functions to use and how to proceed?
thanx
|
|
|
|
|
Hi All,
I have created 2 seperate application. now i want to transfer
information from one application to other . i know little bit about
IPC but i am still confuse.
please tell me.
if both application are running in seperate machine which method is best. or running in same machine which one is best in all aspect (fast processing..)
Please help me.
Prashant
|
|
|
|
|
Hello,
You should choose the method you want depending on your needs. If you want really fast data transfer, you could use UDP, but the data might not arrive completely. If you need the data exact as you send it, TCP could be of some help. It is a little bit slower, but the data arrives just like you send it.
You could also use some form of middleware (CORBA, RMI, ...) but this is more slow than raw socket programming. It is more easy in most cases though.
You'll only learn to make the best choice by experience...
Behind every great black man...
... is the police. - Conspiracy brother
Blog[^]
|
|
|
|
|
Thanks Blog,
Its very usefull information for me. but can you differentiate socket connection vs pipe,window messageing , RPC. so that i better understand
which is sutable for my applicaion.
I want to develop two application one store some information in data structure and other retrive and delete that information.
I don't want to use database. i want fast processing in it.
can you suggest me which is better.
Regards
Prashant
|
|
|
|
|
Hello,
First, my name is not Blog, it's Bob..
So you want to process your data fast. What has to be fast? The connection so that your data is transferred quickly? Do you want your application to process the data fast? How did you define "fast"? By this I mean, by what numbers is your application considered fast...
One other thing, where do you store the information. Do you store it in a file or do you keep it in RAM? Does the retrieval app needs to extract the information by itself or does the storing app push the data to the other...
I think that you need to do some more research on what you really want. After you do this, the way you'll need to communicate will become clear. One advice, don't bother too much with performance now, implement one solution and when it isn't fast enough, you can always do better later!
Kind regards,
Bob
Behind every great black man...
... is the police. - Conspiracy brother
Blog[^]
|
|
|
|
|
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
|
|
|
|