|
Or doing it by associating your programm to office in the registry,
or doing a message-spy looking at which programm is being called and, if office... then call your as well.
But sorry, I can't tell you code.
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
|
|
|
|
|
doing something with office registry will not be feasible for me... can u elaborate on message spy thing???? not exactly code but some referrence ...
thanks
|
|
|
|
|
If I need to do it I will do it, but at the moment... I can give you (and I have given you) the idea how to go in that way. There are articles and message in forum in this website. And you have google. Use it
I have read an article that intercepts mesenger and makes some things. I guess is something similar.
Look for info about HOOKS, THREADS and MESSAGES RECEPTION you should find something to use
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
|
|
|
|
|
THANKS ALOT SIR... U SHOWED ME THE RIGHT PATH, NOW I WILL FOLLOW IT UP...
|
|
|
|
|
rishimohan wrote: URGENT!!!!! HELP PLEASE!!!!!!!!!!!
not a really good description for a question, isn't it ?
|
|
|
|
|
How to send unsigned char* using winsock.h?
The send function in winsock that I know is only accepted char*.
Thanks.
|
|
|
|
|
So what exactly is the problem? As long as the receiving end casts what it gets to an unsigned char , it should be fine.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
The server is only accepted unsigned char, and I can't change the configuration (it's must not).
So my client application should send unsigned char.
The problem : is winsock able to send unsigned char?
|
|
|
|
|
Just make a cast to a char*, it is that easy.
|
|
|
|
|
wira1guys wrote: The problem : is winsock able to send unsigned char?
Not unless you first cast it to a signed char .
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Thanks.
I had already found that winsock is send the value of the char, it depends on the length parameter.
|
|
|
|
|
Hi
I am writing a OpenGL Application and I want to put it into a SDI Application with Visual C++ .NET 2003.
I have used a tutorial on code guru to get the SDI kind of working, but I cant figure out how to resize the openGL window when the SDI window is being resized.
I have placed my whole openGL SDI application on
http://www.ece.ubc.ca/~npatel/OpenGL/OpenGLTest.rar
Any help would be greatly appreciated.
Thanks
|
|
|
|
|
Can you post some relevant code snippet ? Where do you put the openGL stuff ? In a control, on a view, ... ? If that's the case, you just have to resize this control.
|
|
|
|
|
You can download the whole project from the link I provided.
|
|
|
|
|
1) I don't have winrar installed on my computer (I'm at work)
2) I don't really want to dig into your code trying to understand what you did without any explanation.
You should be able to provide some relevant code snippet and explain clearly your problem. That's already a big step in understanding your problem and trying to solve it.
Remember that people here have limited time and are not getting paid.
|
|
|
|
|
|
Is there any way to create a memory device context that is valid between processes? If you do a HDC hdc = CreateCompatibleDC(...) its returning a pointer that's valid only for the current process address space. However, considering that DLL's can designate blocks of memory that are shared between processes, it seems you could have a mem DC shareable between processes as well.
|
|
|
|
|
An HDC is only valid within the context of the process that created it.
You can share the handle in a shared data segment but that won't make it
valid to another process.
What part(s) of the device context are you looking to share between processes?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Mark Salsbery wrote: An HDC is only valid within the context of the process that created it.
You can share the handle in a shared data segment but that won't make it
valid to another process.
What part(s) of the device context are you looking to share between processes?
Just an HBITMAP, not fonts, or pens, etc. If one process does a hdc = CreateCompatibleDC(...) and SelectObject(hdc,hbmp), I want any other process to be able to BitBlt to/from it.
This hdc is part of a C++ object I have defined in a shared memory segment of a DLL:
G g_list __attribute__((section ("shared"), shared));
So, every process that accesses that DLL is accessing the exact same g_list and g_list members. The class doesn't contain pointers, with the exception of this hdc which I didn't realize was a local pointer.
|
|
|
|
|
Force Code wrote: Just an HBITMAP
Sharing pointers between processes is a no-no, you need to share the data. In this case that data is called a "dib section".
Waldermort
|
|
|
|
|
I was going to suggest the same thing as WalderMort -
A DIB section through a named file mapping (in-memory).
All the info you need to create the DIBSection and a
memory DC in the second process can be shared.
See CreateDIBSection()[^].
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Mark Salsbery wrote: I was going to suggest the same thing as WalderMort -
A DIB section through a named file mapping (in-memory).
All the info you need to create the DIBSection and a
memory DC in the second process can be shared.
See CreateDIBSection()[^].
We must be looking at documentation near simultaneously, somehow. I saw the file mapping thing but ruled it out as too byzantine (for my tastes).
What I did instead was to make hdc static in the class - which results in each process having its own copy - strangely. Since the class is in shared memory, making it nonstatic means every process has the same copy - static results in the opposite in this case. Then I have another new static member local_cnt. if local_cnt != (nonstatic)cnt then the static hdc is deleted and recreated (thus synchronizing with changes elsewhere.
|
|
|
|
|
Force Code wrote: What I did instead was to make hdc static in the class
And in a few weeks you will be asking why your code is crashing unexpectedly.
Waldermort
|
|
|
|
|
...or days
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|