1. Cannot Get Win32Lib to Work
- Posted by cran0g Jul 29, 2023
- 790 views
Hi Folks,
After a long break, I'd like to get back into Euphoria. A lot has happened - it's OpenEuphoria now, for example. I have installed Euphoria 4.1 on my Windows 11 laptop. I unzipped Win32Lib into the same Euphoria directory and then rebooted to get any environment variables updated. I went into the Demos folder of Win32Lib and tried a few of the exmples by double-clicking them from a Windows explorer folder. Up came the CLI window with the error:
<0212>:: Internal error at E:\Euphoria\Win32Lib\Include\Win32lib.ew:7527 <0268>:: Scanner unhandled class 0
When I hit the enter key, another message appears:
Fatal run-time error: <0213>:: Failed due to internal error.
I tried several of the examples and I get the same error messages. Getting Euphoria to work in the Windows environment is critical to me. Any ideas from you folks?
Any help would be gratefully received.
2. Re: Cannot Get Win32Lib to Work
- Posted by Icy_Viking Jul 29, 2023
- 754 views
Hi Folks,
After a long break, I'd like to get back into Euphoria. A lot has happened - it's OpenEuphoria now, for example. I have installed Euphoria 4.1 on my Windows 11 laptop. I unzipped Win32Lib into the same Euphoria directory and then rebooted to get any environment variables updated. I went into the Demos folder of Win32Lib and tried a few of the exmples by double-clicking them from a Windows explorer folder. Up came the CLI window with the error:
<0212>:: Internal error at E:\Euphoria\Win32Lib\Include\Win32lib.ew:7527 <0268>:: Scanner unhandled class 0
When I hit the enter key, another message appears:
Fatal run-time error: <0213>:: Failed due to internal error.
I tried several of the examples and I get the same error messages. Getting Euphoria to work in the Windows environment is critical to me. Any ideas from you folks?
Any help would be gratefully received.
Perhaps you are using the old win32lib. You may want this https://openeuphoria.org/wiki/view/Win32Lib.wc Scroll down to the bottom of 2020 update which updated win32lib for Euphoria 4.1
There has been some talks about rewriting a new win32lib with the newer features and more modern Windows API. Although Euphoria is a small community.
3. Re: Cannot Get Win32Lib to Work
- Posted by cran0g Jul 29, 2023
- 736 views
Thanks, icy-Viking. Will try that out!
4. Re: Cannot Get Win32Lib to Work
- Posted by Icy_Viking Jul 29, 2023
- 754 views
Thanks, icy-Viking. Will try that out!
No problem. It should work. It works for me and I'm under Windows 11 along with running WSL/g.
5. Re: Cannot Get Win32Lib to Work
- Posted by cran0g Jul 29, 2023
- 753 views
No, that's the one I downloaded from Box. Any other ideas? Do the error messages give any clues?
6. Re: Cannot Get Win32Lib to Work
- Posted by Icy_Viking Jul 29, 2023
- 759 views
No, that's the one I downloaded from Box. Any other ideas? Do the error messages give any clues?
What I did is I copied all the include files from the win32lib "include" folder and put them into the Euphoria directory under the include folder in Euphoria's directly. I can double click Win32lib programs and they run fine.
7. Re: Cannot Get Win32Lib to Work
- Posted by cran0g Jul 29, 2023
- 731 views
There was a corruption in win32lib.ex. I copied over a better version. Now when I run win32lib programs, I don't get the error message any more - instead, I get a system dialog telling me that registerClasEx failed. Wierd stuff starts happening, such as my borwser closing down and the Windows 11 shutdown dialog appearing.
I think that's it for me. I'm not sure win32lib works on WIndows 11 and I can't risk it corrupting anything.
8. Re: Cannot Get Win32Lib to Work
- Posted by Icy_Viking Jul 29, 2023
- 740 views
There was a corruption in win32lib.ex. I copied over a better version. Now when I run win32lib programs, I don't get the error message any more - instead, I get a system dialog telling me that registerClasEx failed. Wierd stuff starts happening, such as my borwser closing down and the Windows 11 shutdown dialog appearing.
I think that's it for me. I'm not sure win32lib works on WIndows 11 and I can't risk it corrupting anything.
It works just fine for me under Windows 11.
https://github.com/ghaberek/awesome-euphoria - This has a list of really cool Euphoria programs.
https://katfile.com/oaqj2hl0krx9/Win32lib.zip.html - This is win32lib for Eu 4.1, from my own collection. It works just fine for me, no corruption or errors.
9. Re: Cannot Get Win32Lib to Work
- Posted by jmduro Jul 30, 2023
- 718 views
There was a corruption in win32lib.ex. I copied over a better version. Now when I run win32lib programs, I don't get the error message any more - instead, I get a system dialog telling me that registerClasEx failed. Wierd stuff starts happening, such as my borwser closing down and the Windows 11 shutdown dialog appearing.
I think that's it for me. I'm not sure win32lib works on WIndows 11 and I can't risk it corrupting anything.
win32lib_r2, my restructured version with less included files, also works with Windows 11: https://github.com/jm-duro/win32lib_r2
Jean-Marc
10. Re: Cannot Get Win32Lib to Work
- Posted by cran0g Jul 30, 2023
- 685 views
Thanks for the further feedback, guys. There's one other thing to try out - I'm going to run it on a brand-new machine I bought a few weeks ago. I lecture on stuff like Business Analysis, Business Aerchitecture, that sort of stuff (yawn), and I purposely not installed anything on it except Zoom, Teams and Office365. However, I'll try to install Eupria on that, too. Perhaps there's a problem with my Windows installation on the machine I've been using. If it all works for you guys, it ought to work for me.
I'll try that out and get back to you. It would be good for other newcomers if we could bottom this out. I once wrote a guide called Euphoric Mysteries for other newbies, so it's a bit embarrassing I can't get win32lib to work with OpenEuphoria.
Thanks for your help again.
11. Re: Cannot Get Win32Lib to Work
- Posted by cran0g Jul 30, 2023
- 680 views
Apologies for all the mis-types, BTW.
12. Re: Cannot Get Win32Lib to Work
- Posted by cran0g Jul 31, 2023
- 651 views
OK. I must be doing something wrong. I have taken a brand-new ThinkPad, installed Euphoria 4.1 onto an attached memory stick, downloaded the recommended win32lib for 4.1 and extracted it into the root of my Euphoria installation, updated eu.cfg to point to the correct locations and rebooted.
I get the same "registerClassEx failed" error. So, it can't have been an OS issue on the other laptop. I must be missing a step but I don't know what that is. I haven't set an EUINC or EUDIR path because I understood eu.cfg had made those obsolete.
Can anyone think what I'm doing wrong? For it to have failed on two completely different machines must mean I'm failing to do something.
Getting desperate ...
13. Re: Cannot Get Win32Lib to Work
- Posted by cran0g Jul 31, 2023
- 665 views
Well, guys, I have now uninstalled Euphoria from my memory stick and re-installed it on the C: drive, just in case it didn't like being installed on a USB device. I also followed the advice of updating the registry with the new path. I have rebooted after installation, changed the eu.cg in both the win32lib and the win32lib/demos folder. And, when I run any of the win32lib demos, I get the same fatal error of registerClassEx.
Pity ...
14. Re: Cannot Get Win32Lib to Work
- Posted by cran0g Jul 31, 2023
- 665 views
Sorry to keep boring everyone about this but I think it's important for anyone trying out Euphoria for the first time.
As an *absolute* last-ditch attempt, I went back to Rapid Euphoria and downloaded Chris B's combined Euphoria 3.1.1 and win32Lib. It all worked straight out of the box! All the win32lib demos ran without issue.
Can't understand how I cannot get win32lib for 4.1 to work on the same platform.
15. Re: Cannot Get Win32Lib to Work
- Posted by petelomax Jul 31, 2023
- 657 views
Sorry to keep boring everyone about this but I think it's important for anyone trying out Euphoria for the first time.
Don't worry about that, it's all rather quiet round here anyways.
As an *absolute* last-ditch attempt, I went back to Rapid Euphoria and downloaded Chris B's combined Euphoria 3.1.1 and win32Lib. It all worked straight out of the box! All the win32lib demos ran without issue.
Can't understand how I cannot get win32lib for 4.1 to work on the same platform.
One thing I cannnot see mentioned, and it is not as drastic as it might first sound, is you need to be running a 32-bit version of Eu for win32lib to work. It should and will all work fine on a 64-bit OS.
It's about time I shipped a new release of Phix, keep your eyes peeled for that, you might want to give that a try.
It will contain an alpha version of the new gui I've been working on, which can use 64-bit native WinAPI (as well as 32-bit, and/or GTK for use on Linux), still far from complete though.
16. Re: Cannot Get Win32Lib to Work
- Posted by cran0g Jul 31, 2023
- 633 views
And there you go ... Many thanks, indeed. It now works. I didn't see the need for a win32 environment anywhere. Did I miss something?
I'm so glad it's working.
I had uninstalled everything, so I had to reinstall it all over again. Really glad I did.
Thanks again!
17. Re: Cannot Get Win32Lib to Work
- Posted by euphoric (admin) Jul 31, 2023
- 643 views
It's about time I shipped a new release of Phix, keep your eyes peeled for that, you might want to give that a try.
It will contain an alpha version of the new gui I've been working on, which can use 64-bit native WinAPI (as well as 32-bit, and/or GTK for use on Linux), still far from complete though.
Don't be a tease, Pete!
18. Re: Cannot Get Win32Lib to Work
- Posted by Icy_Viking Jul 31, 2023
- 647 views
I forgot about the difference between 32-bit and 64-bit Euphoria. Should have thought of that as well. You can have both 32 and 64 bit Euphoria installed on the same machine, just make sure they're in separate folders or directories. I often use the 32-bit builds of DLLs for my wrappers for compatibility reasons. I've also been looking into the Windows API. A new win32lib with a more modern Windows API would be good, but the Windows API is huge. Also, that new GUI program sounds interesting.
19. Re: Cannot Get Win32Lib to Work
- Posted by cran0g Jul 31, 2023
- 665 views
I'm just glad I was able to get it working on my laptop!
20. Re: Cannot Get Win32Lib to Work
- Posted by ghaberek (admin) Aug 01, 2023
- 613 views
I forgot about the difference between 32-bit and 64-bit Euphoria. Should have thought of that as well. You can have both 32 and 64 bit Euphoria installed on the same machine, just make sure they're in separate folders or directories. I often use the 32-bit builds of DLLs for my wrappers for compatibility reasons. I've also been looking into the Windows API. A new win32lib with a more modern Windows API would be good, but the Windows API is huge. Also, that new GUI program sounds interesting.
I think I figured out the changes required to make Win32Lib work on 64-bit. It mostly has to do with (surprise surprise) structure type sizes and alignment.
-Greg