12 June 2016, 23:21 | #1 |
Returning fan!
Join Date: Jan 2011
Location: Montréal, QC, Canada
Posts: 1,434
|
How to free resources locked by MUI programmatically for auto-update
Hi all!
I want to implement an auto-update feature for AmiModRadio because it is silly to ask users to download/install new versions of a program designed to access the Internet Unfortunately, MUI locks resources (and also here) upon exit so how can I programmatically free/unlock these resources? Thanks in advance! |
12 June 2016, 23:24 | #2 |
Returning fan!
Join Date: Jan 2011
Location: Montréal, QC, Canada
Posts: 1,434
|
PS. I could probably call FlushMUI from AmiModRadio but that would not be elegant and, besides, I am not sure that I can distribute FlushMUI with AmiModRadio independently and that it works with MUI version < 4?
|
13 June 2016, 10:20 | #3 | |
Posts: n/a
|
Quote:
I will see if I can come up with a special program to let MUI flush the cached images only. But this will definitely NOT work with MUI3 and there is no guarantee that the images files you are going to replace really can be flushed. If they are still in use then there is no other way than to terminate the applications using that specific image. |
|
13 June 2016, 11:14 | #4 | ||
Returning fan!
Join Date: Jan 2011
Location: Montréal, QC, Canada
Posts: 1,434
|
Quote:
Quote:
|
||
13 October 2016, 21:26 | #5 |
Returning fan!
Join Date: Jan 2011
Location: Montréal, QC, Canada
Posts: 1,434
|
Hi Thore!
Sorry to bump this thread but would you have a programmatic way to flush resources? I would need it to create an auto-updating MUI program... Cheers! |
20 November 2016, 04:29 | #6 |
Registered User
Join Date: Nov 2014
Location: FT Lewis, WA
Posts: 374
|
Assuming I am understanding what you want, this is the code I use to free up MUI resources:
Code:
MUI_DisposeObject(Object->App); FreeVec(Object); Of course I have declared all my MUI resources in struct ObjApp * Object; Last edited by DH; 14 November 2017 at 17:28. Reason: Deleted direct signature |
04 December 2016, 00:55 | #7 | |
Returning fan!
Join Date: Jan 2011
Location: Montréal, QC, Canada
Posts: 1,434
|
Hi there Saghalie!
Quote:
Cheers! |
|
20 September 2018, 05:51 | #8 | |
Returning fan!
Join Date: Jan 2011
Location: Montréal, QC, Canada
Posts: 1,434
|
Quote:
Just to confirm with you that I could do the other way around: wait to update the files after the next reboot and the next run of the updater, i.e., before any file is locked by MUI. I could test whether any file is locked using: Code:
lock = Lock(file_name, EXCLUSIVE_LOCK); Best, Tygre |
|
08 October 2018, 19:23 | #9 |
Returning fan!
Join Date: Jan 2011
Location: Montréal, QC, Canada
Posts: 1,434
|
PS. Just to close this threat: Thore confirmed that checking the lock is the way to go
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Free TCP Stack for 3.1 (no MUI) | Leandro Jardim | support.Apps | 6 | 11 July 2019 12:08 |
Auto-update window | tolkien | request.Apps | 4 | 08 October 2016 23:23 |
How to Programmatically Quit a MUI Application? | tygre | support.Apps | 2 | 02 March 2016 00:24 |
Horizontal Group Has Content Partially Hidden in MUI v4, Not MUI v3.8a | tygre | support.Apps | 6 | 29 February 2016 03:27 |
WinUAE Auto-Update? | Mequa | request.UAE Wishlist | 15 | 19 October 2010 11:37 |
|
|