View Single Post
  #7 (permalink)  
Old 05-19-2009, 12:31 AM
volDeus's Avatar
volDeus
PPCGeeks Regular
Offline
Location: Las Vegas, Nevada
 
Join Date: Jun 2007
Posts: 171
Reputation: 305
volDeus is becoming a PPCGeeks regularvolDeus is becoming a PPCGeeks regularvolDeus is becoming a PPCGeeks regularvolDeus is becoming a PPCGeeks regular
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Send a message via MSN to volDeus Send a message via Skype™ to volDeus
Re: Running two instances of a program at the same time?

Quote:
Originally Posted by theedon View Post
get yourself a copy of ms visual studio 2008. instantiate an unmanaged code project (thats win32 C++). now compile and run. thats it... the default template has the check pre coded for you. when im back at my computer i'll post the actual lines of code. it requires the coder to specifically change the behavior. the template also hard codes the window name and the window class. the reason it does this is so that it can do a search with those two inputs to determine if the program is running. that is why changing the program name doesnt always work. the coder has to tell the program to allo such behavior. but, the default template does not allow that.

now since tcpmp is written in unmanaged code and it behaves as i have described... need i say more?
You seem to know more about the specifics than I do ... But I have MSVC 2008 and at least one small app I coded myself works with the renaming method (and a few others that I didn't)...

The app is a simple carpenter's calculator with algebraic formula parsing and common construction formula templates ... Before I added support for multiple memory slots in the calculator I used to run multiple instances of the same process when I had two things at work to keep track of at the same time...

It is unmanaged code (C++ WIN32 API + WM5 SDK) and I never did anything to it to prevent the type of checking you are talking about (obviously, since I wasn't aware of the default behavior until you mentioned it) so ... While I acknowledge that you seem to know more about the specifics than I do ... Apparently there is an exception to the rule...

In any event, I would be curious about the lines of code you mentioned but I don't want to take any more attention from the OP's original question so I'll leave off here... You could PM them to me if you are bored sometime
__________________
---- volpe Deus ---- Device: HTC RhodiumW (Sprint Branded) ROM: Under Construction -- Radio: Sprint 2.32.00WF -- PRL: 60660 -- OS: WM6.5 b23554 -- GUI: Sense 2.5.2012 --

Last edited by volDeus; 05-19-2009 at 12:34 AM.
Reply With Quote