We're running VAST 9.0 and starting to build the 64 bit image on 64 bit machines running Windows 10. How can we determine if nodialog.exe is running? I want to prevent the image from being started multiple times on a workstation. On the 32 bit image on 32 bit machines I ask the SPRDLL.DLL tasksNamedLike: aString | tList listSize location matchingList | listSize := 100. matchingList := OrderedCollection new. tList := self new taskList: listSize. 1 to: listSize do: [ :i | location := (tList at: ('processName', (i printString))) indexOfSubCollection: aString startingAt: 1. location = 0 ifFalse: [matchingList add: (tList at: ('processID', (i printString))).]. ]. ^matchingList.
taskList: aSize | tListStructure tListPointer tListFunction rc | tListStructure := (self taskListStructureCompoundType: aSize) newRecord. tListPointer := (tListStructure abtMoveToOSMemory data). tListFunction := PlatformFunction callingConvention: 'c' function: 'GetTaskList' library: 'SPRDLL' parameterTypes: #(pointer int32 ) returnType: #int32. rc := tListFunction callWith: tListPointer with: 100. tListFunction := PlatformFunction callingConvention: 'c' function: 'GetWindowTitles' library: 'SPRDLL' parameterTypes: #(pointer int32 ) returnType: #int32. rc := tListFunction callWith: tListPointer with: 100. ^tListStructure. I then look through the result for nodialog.exe. Thanks for looking. You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at https://groups.google.com/group/va-smalltalk. To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/6915aa3d-8164-4aaa-8bda-006251a5a4ae%40googlegroups.com. For more options, visit https://groups.google.com/d/optout. |
Greetings Steve,
-- Have you tried running nodialog.exe with the "-singleinstance" command line parameter? https://www.instantiations.com/docs/91/wwhelp/wwhimpl/js/html/wwhelp.htm#href=sg/stug50.html I believe you are on active support with us? If this doesn't solve your issue, send in a support case as we have some things ready-to-go that we can offer. Kind Regards, - Seth On Friday, May 17, 2019 at 10:46:22 AM UTC-4, Steve Ripley wrote:
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at https://groups.google.com/group/va-smalltalk. To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/71ec5082-892e-4cdc-9459-74d661d3d170%40googlegroups.com. For more options, visit https://groups.google.com/d/optout. |
Administrator
|
On Friday, May 17, 2019 at 8:53:11 AM UTC-7, Seth Berman wrote:
--
I like the idea of -singleinstance, but if my memory serves, the feedback to the user is insufficient. (Possibly no feedback at all) I seem to recall that -singleinstance did not do anything such as raise the topmost window of the already running instance, so a minimized or obscured application would remain invisible to the user. Of course, things may have changed in the decade or two since I last experimented with that command line option. It would be good if one could configure the image to provide message text to display if -singleinstance finds it isn't the first instance. Of course, the implementation probably doesn't even start the VM, so getting information from the image might be problematic. Perhaps an optional argument on the command line for the message to display? Steve, I always recommend copying nodialog.exe to e.g. myappname.exe when deploying an runtime image. a) The task list gives better indication of what it is b) If you were to have a second image running concurrently (i.e. a different Smalltalk application), two nodialog.exes would make the task list especially confusing and eliminate any possibility of using -singleinstance.
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at https://groups.google.com/group/va-smalltalk. To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/c0d4bcb2-10bf-4c1d-8062-bb03eb2bd0fe%40googlegroups.com. For more options, visit https://groups.google.com/d/optout. |
Hi Richard,
-- I don't see that there is any feedback (unless running a debug version of the the exe). It does not start the vm, the implementation is based on the working of CreateMutex on Windows right at the beginning of main() in the exe so you would need to print to stdout. A search on this topic shows that it is pretty much the accepted way to do it. However, I see some other places where you can use FindWindow() to force something to the front...we just don't have that. Looks like we have a case in our backlog on just this issue which references a google post. The last entry in the post is interesting and worries me a little. It obviously has never rising to the level of being implementable, but I can take a second look. - Seth On Friday, May 17, 2019 at 1:43:13 PM UTC-4, Richard Sargent wrote:
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at https://groups.google.com/group/va-smalltalk. To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/6aacb3e7-5b2e-4f54-9a4d-01ca4737d56d%40googlegroups.com. For more options, visit https://groups.google.com/d/optout. |
Administrator
|
On Fri, May 17, 2019 at 11:09 AM 'Seth Berman' via VA Smalltalk <[hidden email]> wrote:
--
That's what I thought I remembered. What about having the nodialog.exe display a message provided on the command line following the -singleinstance option (or using e.g. a -sim "message" option)?
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at https://groups.google.com/group/va-smalltalk. To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/CAGNapEOLrH%3D7VZ53ZQ7PmmWt%2BdxhoGxQv4EW0_b7y%3DwTD2tFQQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout. |
In reply to this post by steve.ripley10
Hi Steve during the startup of the client application we are using this function call OSSecurityAttributes>>#createMutex:lpszMutexName: to check if the application is running. The check can be done per session (local) or per machine (global). br Norbert You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at https://groups.google.com/group/va-smalltalk. To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/74fc4c58-e6a8-4e1b-a314-71c95d30f5f1%40googlegroups.com. For more options, visit https://groups.google.com/d/optout. |
On Monday, May 20, 2019 at 7:04:48 AM UTC-5, Norbert Schlemmer wrote:
Thanks all for the responses! Ripley You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at https://groups.google.com/group/va-smalltalk. To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/0d680b58-bd91-4dc2-87ec-be314f7a6bf4%40googlegroups.com. For more options, visit https://groups.google.com/d/optout. |
In reply to this post by Richard Sargent
Hi Richard,
-- Sure, that's reasonable suggestion. I'll take a look. Thanks. - Seth On Friday, May 17, 2019 at 3:12:51 PM UTC-4, Richard Sargent wrote:
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at https://groups.google.com/group/va-smalltalk. To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/160760b5-db8f-4319-a80f-3a93e5ab5386%40googlegroups.com. For more options, visit https://groups.google.com/d/optout. |
Hi Guys,
-- I've used "-singleinstance" on windows and it works fine. It would be nice if the image could in someway be informed that an attempt to start the same program again occurred. If say, the program is a GUI and the main window is minimized, the image could then display the window. This would probably get the user where they want to be. Lou On Monday, May 20, 2019 at 10:09:31 AM UTC-4, Seth Berman wrote:
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at https://groups.google.com/group/va-smalltalk. To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/6bdc63ea-fde3-4c0f-9abf-445197b6e144%40googlegroups.com. For more options, visit https://groups.google.com/d/optout. |
Free forum by Nabble | Edit this page |