|
Hey everybody
I've been looking for a way to do that for a while, and right before I'm starting to go through the routing table and figure out the packet's trace I am turning to you...
Once a user connects to a VPN it receives an IP inside the organization he/she connected to.
Is there a way to get that IP? (I know it is in the routing table, but I don't know how to recognize that specific IP instead of others that might be...)
Thanks a lot in advance!
|
|
|
|
|
Hi,
I am working on an MFC Application in which there is chat option with sending emoticons/smiley features.
I am having the codes for each emoticons. When the emoticons button is clicked i want its code to de added in the EditBox.
Now the problem i am facing that I am unable to put the code of smiley at the cursor position. Rather I am able to put it either at the begining of the text or at the end of the text.
please help me.
Thanks In Advance.
Dhiraj Kumar Saini
|
|
|
|
|
|
Thanks a lot for the help. It solved my problem.
|
|
|
|
|
Hello,
I am developing a client and server application for bluetooth devoce. My server is desktop PC which has dongle attached and client will be Windows Mobile. As client server get connected server will send to client list of some files. from the client side i should be able to download file means copying file from server to client. I am using sockes for eastablise connections. Now i have to send a file from server to client. How can i send a file? Please help me.
Thanks and regards,
Yudhisthira attry(India, Bangalore)
|
|
|
|
|
I have three class's that I use in nearly every program I create. Each class is from a dialog resource. I want to create a DLL that would contain those dialogs and the class's that represent them. Is this possible? If so could someone point me to an example that loads another program's dialog resource and class?
A C++ programming language novice, but striving to learn
|
|
|
|
|
It's absolutely possible, just keep the three classes in a separate DLL project that you can include in any solution you create. Just include the appropriate headers where necessary, making sure to set the include paths as needed in the project configurations of the other projects, and set the project dependencies to include this DLL.
Not sure if I can point you to an example right now, but this is a rough idea of how it's done.
|
|
|
|
|
How do I include the dialogs the class's represent?
Do I create the dialogs in the DLL or somehow expost the dialogs from the other program into the DLL or what?
A C++ programming language novice, but striving to learn
|
|
|
|
|
Are these CDialog-derived (MFC) classes or your own classes?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Yes. I've started the DLL. I used the resource editor to create the dialogs in the DLL. Hopefully the programs the DLL is used in won't complain about the DLL's resource file. Will it?
A C++ programming language novice, but striving to learn
|
|
|
|
|
You have a few options, depending on how you want to link
to the MFC libraries and how your DLL will be used.
Read this link VERY carefully, choose the type of DLL you want,
and follow the links to that DLL type....all the info you need to
use them properly is there.
Kinds of DLLs[^]
If your dialog classes are derived from MFC, and only MFC apps will
use the DLL, then an Extension DLL[^] is probably a good choice.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
I used "Static" instead of Extension". maybe I can change it?
A C++ programming language novice, but striving to learn
|
|
|
|
|
What is "static"? Statically linked to the MFC libraries?
If so, keep in mind your DLL and EXE will be using two different
MFC library instances. That means you can't pass MFC objects between
the EXE and the DLL.
Extension DLLs must use the shared/DLL version of the MFC library, so
both the EXE and the DLL would use the same instance of the MFC library.
It's up to you which is better for your application.
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
I guess I'm confused again. My entire program uses the Static MFC Libraries. I thought I would have to use the Static DLL because of that. Is there a Static Extention DLL? I don't see how I can in the "Client" application link to MFC Statically, but in the DLL link Shared? What do you think?
A C++ programming language novice, but striving to learn
|
|
|
|
|
That's why I stated read the link CAREFULLY
You can link all your modules to the MFC libraries statically, but the restriction
I mentioned applies...
every module - EXE or DLL - gets its OWN MFC library. That means you can't pass
any MFC objects between modules. You can't even pass a CWnd to be the parent of
one of your dialog DLLs. Every module gets its own CRT as well, so each has its own heap.
There's no such thing as a "static DLL". We're discussing how MFC is linked TO your DLL.
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Well, I can't use DLL's then, because CMainFrame passes CWnd to all my dialogs for loading. So I can't use DLL's. I guess DLL's are useful somehow, but I simply can't use them. Thanks for your help though.
A C++ programming language novice, but striving to learn
|
|
|
|
|
If you're linking everything statically, why not make a static library
to hold the common dialogs?
You'll have to make sure resource IDs in the library don't clash with
resource IDs in modules that use the library.
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Mark, I don't know how? Can you tell me how? or point me to an example. I wouldn't know where to begin.
In the DLL I just completed, I, out of habit, checked both programs that the DLL would have been used in, to make sure all Controls were different(Resourse ID's). I didn't know you could make a "Static" Library, or what is supposed to be included in one.
A C++ programming language novice, but striving to learn
|
|
|
|
|
I have taken over several MFC projects in VS 6.0 and .NET that use a lot of the same code. I'm wanting to consolidate a lot of the sources files that are the same so that any changes I make will happen to all the other projects using the same code when they are rebuilt. What is the best way to organize this code? Just put them in a separate directory separate from the projects and include them in the project?
|
|
|
|
|
A project on their own and produce a DLL?
|
|
|
|
|
This page shows how to retrieve the command line a certain process was started with http://win32.mvps.org/processes/remthread.html if you know the PID. We have a runtime, a .exe-file. Several instances of the same file will be launched. The only difference between them is the port they’re connected to. The runtime is a CoDeSys runtime which we don’t have the source code for. The application is a CoDeSys (PLC IEC 61131-3) application which logs in to http://localhost:<port number>. (The CoDeSys ENI server occupies the localhost address so IIS cannot run if the ENI server is running.) We want to retrieve the command line arguments which were used when launching each runtime. So the question is: How do you do that if the only thing which differs them is the port of localhost they’re logged in to? How do you find the PID of the process which uses http://127.0.0.1:1200, http://127.0.0.1:1201, http://127.0.0.1:1202, http://127.0.0.1:1203, etc. etc?
|
|
|
|
|
I had a hard time reading your post due to lack of spacing, however, I believe the answer to the question in your title normally within windows is to type the following from a command prompt:
netstat -ano
there is probably a class or library that will make this easy to implement but I'll leave that up to you to google for...
|
|
|
|
|
I'm trying to override the global delete operator.
void operator delete(void* pAddr)
{
...
}
In this method I do some work and then I would like to call the default delete. However
::delete(pAddr)
always call my delete operator. In my code I have to use delete p; which should call my operator but within my operator I would like to call the default system defined delete operator.
Any idea how to call (obtain) the default delete operator?
Thanks,
Abyss
|
|
|
|
|
Abyss wrote: In this method...I would like to call the default delete.
How about calling free(pAddr) instead?
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Not sure if it is OK. My understanding is that a pointer allocated by new operator should be freed by delete and call free on the pointer can cause problems...
|
|
|
|