I have a question on CString. I want to put a multiline string in a CString variable and I don't want to put all the text in one line. Is there a easy way to do it? What I want is something like following.
I want to create a button control in the constructor of my CDocument class in an SDI program but I cannot figure out what the parent CWnd should be, as it cannot be '*this' as '*this' return a CDocument.
The hardest part about TAPI is making sure your hardware supports it correctly.
But you know when the truth is told,
That you can get what you want or you can just get old,
Your're going to kick off before you even get halfway through.
When will you realise... Vienna waits for you? - "The Stranger," Billy Joel
I am involved in a network monitoring project where I have completed a multiple client chat application by establishing a connection between the client and server using sockets.I would like the server to know what application is being run on the client so that it can monitor the activities of the client.For eg,when I open VC++ to do some thing at the client,at the server I should be able to know this.Please can some one help me about how to proceed to do this.
Heres an approach
1.- Have your server app send a request to the client side app for the names of running procesess. do this via standard UDP sockets.
2.- On the client app, and when requested by the server, You need to ennumerate the procesess (or maybe active windows would do) on the client. Use EnumWindows() or EnumProcesess() functions to do it.
3.- the Client app builds an array of strings for the names of running procesess, and sends it to the server app. also do this via sockets, tho it might be trickier than it seems. You might need to design some sort of class or structure that contains the total data lenght and the data itself.
4.- (the easy part) the server gets the data from the client, and displays the list of procesess.
The Process Status API (PSAPI) has some methods that will let you enumerate all processes and obtain specific module information. This API is part of the Platform SDK and is declared in <psapi.h> Is this what you're looking for?
I recently installed Visual Studio 6.0, followed by the January 2004 edition of MSDN. Unfortunately MSDN did not integrate itself with VC++ or VB. I'm assuming that MSDN is designed to be used with VStudio .Net, but is there any way I can hook it into 6.0? At the moment I just get a popup telling me "The MSDN collection does not exist. Please reinstall MSDN."
Are you referring to C++ being portable across various operating systems? If so, the answer is yes, as long as the libraries and compiler that you use are supported on the various operating systems that you want your program(s) to run on.
I know many projects that are written under c(not c++) so that they can make it portable. but c loses the powerfull concept of OO. Does name mangaleing has any effect so that C++ code can not be make portable.
Name mangling doesnt make C++ any less portable - its the C++ code you compile, not the name-mangled output. People probably chose C for the reason that there were more C compilers in the past. Such a decision has no real bearing nowadays
Theorically, C/C++ are independant and run on many machines whatever the source.
Actually, if your program call some specific libraries as unistd.h (standard UNIX functions) this is not recognized by all the compilers (Visual C++ don't know unistd.h for example).
If you want to be as independant as you can, use the standard library of the language, use the native in capital lettres (as INT, UINT, BOOL)..., use TCHAR for unicode or ansi (depending on a #define).
Last Visit: 13-Aug-20 23:29 Last Update: 13-Aug-20 23:29