Ken Dibble wrote:

> I don't let people install this on the server and run it from there, if 
> that's what you're getting at, nor is it intended to run as a Terminal 
> Server application.


I never thought I was developing apps to run on TS, either. But then I 
showed back up a couple years later and lo and behold. I was happy I was 
writing settings to one of:

1) the central database
2) the registry, in HKEY_CURRENT_USER.
3) Rarely (very minimally) the system temp directory as reported by Windows

Then again, I probably missed out on some billable hours, come to think 
of it.


>>There are Windows API functions to create semaphores.  I have some
>>sample code at work that I'll post tomorrow.  If it's any consolation
>>we used to write a semaphore file to the root of C: :-)
> 
> Yeah, changing the code to just write it to C:\ is probably the way to go, 


Seriously, writing anything to the root of c: is wrong, very wrong. You 
don't want their other computer guys saying things like "what kind of 
moron..."

What happens when they lock down write access to c:, or when they want 
to do it but can't because of your app getting in the way of that.


> actually. I just wanted to be able to write it to some standard location 
> that would be known to exist and which a second attempted instance could 
> check without knowing anything about the first instance.


I know this isn't what you are asking for, but I'll just say it. I used 
to limit my apps to single instance, too. I don't remember what method I 
used, but I don't think it was a file-based semaphore. IIRC I would use 
the win api to search for a window that had a title matching my app's 
title. If found, I'd activate it and exit; else continue loading like 
normal.

But, I digress. What I really wanted to point out is that I stopped 
limiting my apps to single-instance, and *the users loved it*.


-- 
pkm ~ http://paulmcnett.com


_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to