Get CoGetClassObject from other process? [closed] - c++

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
I've COM object declared in process A by using CLSCTX_LOCAL_SERVER. So I could call ::CoGetClassObject from this process and get this object.
Could I call ::CoGetClassObject to get COM object of process A from process B, that was just created?
P.S. Process A is still running.
P.S.S. No info about this COM object was found in registry. :-(

If there's no data in the registry, then no, ::CoGetClassObject can't work cross-process. How would it know to look in process A?

Related

Thread crash detection in Linux environment and c++ [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed last month.
Improve this question
I would like to know if there is a way to know if one of my Threads Crashed?
with new c++ methods/libraries or linux system calls
ive been searching the internet and couldnt find a answer to my question

Declaring a variable which has a value in c++ or c that does not get destroyed when the program terminates [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
How can I declare a variable or array that contain a value which does not get destroyed when the program terminates in c or c++?
When the process terminates, the kernel releases the resources owned by it. If you want to keep data/information obtained during the runtime of the process, you can use a database or the file system.
if you want to keep data after your process terminates, try storing it in a file.
check this for more:
file handling in C++

Is there a GetModuleThreadId function? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
Problem: Windows platform.
dll_1 in a process needs to know the thread id
of dll_2 in the same process.
dll_1 already has the hmodule of dll_2.
Although it may seem a trivial task there is no
documentation at all on how this can achieved.
You would think there would be a function such
as GetRemoteModuleThreadId() but if there is then it has been
concealed for security reasons.
A thread and a DLL are distinct and unrelated concepts. A DLL is just "some code that has been loaded into the process's memory" and a thread is a distinct sequence of code execution that happens to execute code, whether it's in the main exe or a DLL.

Catching informations about running processes in Windows [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
My task is to make a program, which counts a time of running processes in windows. Can you suggest me how or from where can I catch that informations?
For list of currently running processes under Windows use EnumProcesses win32 API
http://msdn.microsoft.com/en-us/library/windows/desktop/ms682629%28v=vs.85%29.aspx
example how to do this:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms682623%28v=vs.85%29.aspx
From your question I'm not sure if you need process timing information (CPU time,etc.) or to count instances of given process in memory. Could you please explain this more clearly ?
You can use GetProcessTimes function to get process timing information.

It is possible to get the PID from a given file descriptor( programmatically using C++)? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I have seen lot of tutorials and documentation on how to get the files descriptors from a given pid. Well, I want to do otherwise.
Thanks.
Of course not, that's like trying to get the PID that called main. Every process has a file descriptor 0 (stdin), 1, 2, etc., and they mean different things for each process.
A file descriptor, which is just a small integer, isn't meaningful unless you already know what process you are talking about.