BillSabatine1 Posted July 9, 2024 Posted July 9, 2024 SCITE version 4.4.6, 32 bit I have a small script that uses Semaphores to synchronize access to a file. It used to work great for everyone. A few months ago, I changed PCs and reinstalled AutoIT (version above). Since then, .exe files I compile... "some" folks.. maybe 20%, get unhandled errors (.exe program just dies) when calling a WINAPI (seems like any of them). Trying the CreateSemaphore call via DLLCall didn't work.. program just dies.. no returned status or anything. Any idea what is causing this? As I say, the program used to work fine until I reinstalled AutoIT and recompiled. Thank you
Nine Posted July 9, 2024 Posted July 9, 2024 Post the code you have (make it runable to us, if you want help). Also Scite version is somewhat useless to us. What is the AutoIt version ? It is shown in the help file. “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
Nine Posted July 9, 2024 Posted July 9, 2024 lol, Bill, you are a funny guy, are you ? Or do you live in the future ? Please answer all my questions, otherwise I will see you in the past. “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
BillSabatine1 Posted July 9, 2024 Author Posted July 9, 2024 I wasn't trying to be funny. I brought up the SCITE and hit F1 and this is what it said: v3.3.16.1 © 1999-2022 Jonathan Bennett & AutoIt Team AutoIt v3 Homepage If there is another place to look, please let me know... maybe I"m not looking in the right place... I'll work up a little program that shows the problem and send it. I believe any WINAPI call will do the same. Please note that it only fails for about 20% of the users..... Anyway, thank you for your help... i truly woudl like it. no intent to be problematic. Thank you.... stand by for a simple coding example.
BillSabatine1 Posted July 9, 2024 Author Posted July 9, 2024 Here is a little program that shows the problem.. again, when run by the users that it doen't work on, the .exe just terminates.. no return code or possible error handling. Thank you again #include <Constants.au3> #include <MsgBoxConstants.au3> #include <GUIConstantsEx.au3> ;#include <WinAPIHObj.au3> #include <WinAPIProc.au3> #include <WindowsConstants.au3> Local $hSemaphore = _WinAPI_CreateSemaphore("HRDBSync", 1, 1, 0) if $hSemaphore = 0 Then MsgBox(0, "error", "CreateSemaphore returnedf: " & $hSemaphore) Exit EndIf If _WinAPI_WaitForSingleObject($hSemaphore) = -1 Then MsgBox(1, "error", "WaitForSingleObject Returned: " & _WINAPI_GetLastError()) EndIf MsgBox(1, "OK", "... here we are doing something with a semaphore lock...") _WinAPI_ReleaseSemaphore($hSemaphore) _WinAPI_CloseHandle($hSemaphore) Exit
Nine Posted July 9, 2024 Posted July 9, 2024 When you post code, please use the method shown in the link. Ok, it is lot of infos to manage for you. The code is so basic, that I can find anything to say. Maybe the problem is you AV. Or other security gates. Ask yourself, if you were me, how would you be facing such a code, how would you deal with it... “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
BillSabatine1 Posted July 9, 2024 Author Posted July 9, 2024 That's the issue.. it's so basic it shouldn't fail. If you and your team are not aware of any WINAPI type failures.. such as "I know, it's xxxx.. people have seen that before...".. then I'll look elsewhere. It's something pretty basic, I have to believe. Thank you for looking at it... I'll continue to look at what might be causing it. Take care
Nine Posted July 10, 2024 Posted July 10, 2024 All AutoIt _WinAPI_* functions are just wrappers to the Windows Win32 API. Nothing more nothing less. You did not tell me what is exactly happening to those who fail using this code. Again you should check AV log. “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now