|
Hi,
I am trying to use the getprocessesbyname manged extension from the system:diagnosics system.dll
from .NET with C/C++
Do any one knows away to get for a speacific process name how many process currently running and then use it in an unmanage project.
I don't want to define it with complier \clr and then use #pragm unmange and mange,tried it already and the rest of the project didn't compile.
And the only way I had luck of using it by creating a manage project and
using this code:
[C++]
#using <mscorlib.dll>
#using <system.dll>
using namespace System;
using namespace System::Diagnostics;
int main()
{
//process running eyal.exe
Process* localByName[] = Process::GetProcessesByName(S"eyal");
}
I just want to be able to run only one program eyal.exe ,and if try to run more then one will have a message and then terminate the second process.
Thanks
Will be glad to get any help.
|
|
|
|
|
Its not a good idea to check your process is runnung with you process name. It will be a disaster if the system on which your application is running has another process with the same name but from a different vendor.
To accomplish singleinstance ther are different other approaches. One of the famous article is from Joseph M Newcomer
There is no spoon.
mail
|
|
|
|
|
|
I think this will help anybody who had this same question like I did
1. http://support.microsoft.com/kb/q243953/
2. http://www.devhood.com/tutorials/tutorial_details.aspx?tutorial_id=711
And thanks suhredayan;) for the help
Eyal.
|
|
|
|
|
how can i make my application dominates the Operating system interface and allow the operating system to work in background. If the user wants to access the Operating system services, that is through only my Interface.
:
: please help me regarding in this
dfzgdfg
|
|
|
|
|
AFAMK to run an application you require an Operating system. Can you be a little more clear on what you are looking for.
There is no spoon.
mail
|
|
|
|
|
adnan pathan wrote:
how can i make my application dominates the Operating system...
Why would you want/need to? You can increase the process' priority, but to make it dominate over the OS would not be a wise thing to do.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
dear buddies
i am doing project and i have encountered a problem that how can i embed dialog with in another dialog in VC++. second that how can i access process handle table in VC++ that is in the kernal address space.
ok bye
ali ali
|
|
|
|
|
Hi All
I want to execute a batch file from my MFC application.
I'm using ShellExecute for this purpose,but some times my batch file returns error codes based on certain criteria.How do i get these error codes in my MFC application and react to them ?
Thanks & Regards
krishna
|
|
|
|
|
ShellExecute or ShellExecuteEx dosen't provide the option to know the return value of a process spawned .
Instead use CreateProcess() and then call GetExitCodeProcess() with the handle to the process which was returned by CreateProcess().
There is no spoon.
mail
|
|
|
|
|
|
Hi,
I am trying to use a progress bar on a dialog box but the progress bar seems to be creating some problem to the dialog box as the dialog box will fail to load.
the dialog box works fine if i remove the progress bar.
Other than the commctrl header, what are the things needed for the progress bar to work properly???
|
|
|
|
|
how and where are you instantiating your progress bar control?
bryce
---
To paraphrase Fred Dagg - the views expressed in this post are bloody good ones.
--
Publitor, making Pubmed easy.
http://www.sohocode.com/publitor
Our kids book :The Snot Goblin
|
|
|
|
|
i found my mistakes already. thanks for your quick responses.;)
logan
|
|
|
|
|
HI,
How to convert to mouse coordinates? Iam using a input device(pen) whose movements are not simulating to that of mouse coodinates. Its coordinates(1200 dpi) are different from mouse.
Any advise is welcome.
Thanx in advance.
rgds,
lokiz
lokiz
|
|
|
|
|
you might have to figure out the ratios between mouse x and y vs the pen
then have a small translator function?
have you googled for other knowledge bases on yur pen?
bryce
---
To paraphrase Fred Dagg - the views expressed in this post are bloody good ones.
--
Publitor, making Pubmed easy.
http://www.sohocode.com/publitor
Our kids book :The Snot Goblin
|
|
|
|
|
Hi,
Thanx for reply but bryce i checked their coordinates for a vertical line both look same ,the only diff is the pen generates many coordinates compared to mouses. Got any ways to check the ratios of them ?
waiting for ur reply...
lokiz
|
|
|
|
|
Hi guys,
Just a question with debugging.
What do the memory addresses mean.
0xBAADF00D & 0XDEADBEEF???
As I think i know what BAADF00D which is a Bad or illegal function call at runtime. Now i am not sure if that is right or not.
Any suggestions thoughts FACTS. Welcome
Thanks
..Evil
|
|
|
|
|
|
O, I cant remember now. I got the BAADF00D a couple of times, while playing around with a game i was writing, and the best description i could come up with was a bad function call. but DEADBEEF was one a mate got, now i am used to the standard set of weird memory address and what they mean but these too.. are unknowns. And the MSDN doesn't say jack.
So am at a loss.
..Evil
|
|
|
|
|
|
Thanks heaps, and to think, i always say "Google it". But i dont even follow my own advice.. hahah.
Thanks Again..
..Evil
|
|
|
|
|
Hi,
I am trying to design a GUI using VC++ from the ground up but having problems using Visual Studio.
I have got a three way splitter with a 3 tabbed interface in one of the splitter panes. This is working well but I still had to write code to implement this functionality. This is quite costly with regards to time if I wanted to change this. I am really looking for some better functionality like the Ctrl-T test for dialogs in VC but really a test container that works for the program as a whole.
What do other people use to design GUI's? Does anyone know of a good free design tool that I could employ?
Regards,
Albert
|
|
|
|
|
Use HTML to quickly prototype.
There is prewritten code which makes it much easier to setup splitter windows, etc right here at CP...that should save you lotsa time.
Cheers
How do I print my voice mail?
|
|
|
|
|
A Is Push Down
keybd_event('A',0,0,0);
keybd_event('A',0,KEYEVENTF_KEYUP,0);
Success
Power Is Push Down
keybd_event(255,0,0,0);
keybd_event(255,0,KEYEVENTF_KEYUP,0);
Failure
what should I do?
I don't want to use ExitWindowsEx
|
|
|
|