1. Cannot Get Win32Lib to Work

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.

new topic     » topic index » view message » categorize

2. Re: Cannot Get Win32Lib to Work

cran0g said...

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.

new topic     » goto parent     » topic index » view message » categorize

3. Re: Cannot Get Win32Lib to Work

Thanks, icy-Viking. Will try that out!

new topic     » goto parent     » topic index » view message » categorize

4. Re: Cannot Get Win32Lib to Work

cran0g said...

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.

new topic     » goto parent     » topic index » view message » categorize

5. Re: Cannot Get Win32Lib to Work

No, that's the one I downloaded from Box. Any other ideas? Do the error messages give any clues?

new topic     » goto parent     » topic index » view message » categorize

6. Re: Cannot Get Win32Lib to Work

cran0g said...

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.

new topic     » goto parent     » topic index » view message » categorize

7. Re: Cannot Get Win32Lib to Work

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.

new topic     » goto parent     » topic index » view message » categorize

8. Re: Cannot Get Win32Lib to Work

cran0g said...

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.

new topic     » goto parent     » topic index » view message » categorize

9. Re: Cannot Get Win32Lib to Work

cran0g said...

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

new topic     » goto parent     » topic index » view message » categorize

10. Re: Cannot Get Win32Lib to Work

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.

new topic     » goto parent     » topic index » view message » categorize

11. Re: Cannot Get Win32Lib to Work

Apologies for all the mis-types, BTW.

new topic     » goto parent     » topic index » view message » categorize

12. Re: Cannot Get Win32Lib to Work

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 ...

new topic     » goto parent     » topic index » view message » categorize

13. Re: Cannot Get Win32Lib to Work

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 ...

new topic     » goto parent     » topic index » view message » categorize

14. Re: Cannot Get Win32Lib to Work

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.

new topic     » goto parent     » topic index » view message » categorize

15. Re: Cannot Get Win32Lib to Work

cran0g said...

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.

cran0g said...

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.

new topic     » goto parent     » topic index » view message » categorize

16. Re: Cannot Get Win32Lib to Work

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!

new topic     » goto parent     » topic index » view message » categorize

17. Re: Cannot Get Win32Lib to Work

petelomax said...

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! tongue

new topic     » goto parent     » topic index » view message » categorize

18. Re: Cannot Get Win32Lib to Work

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.

new topic     » goto parent     » topic index » view message » categorize

19. Re: Cannot Get Win32Lib to Work

I'm just glad I was able to get it working on my laptop!

new topic     » goto parent     » topic index » view message » categorize

20. Re: Cannot Get Win32Lib to Work

Icy_Viking said...

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

new topic     » goto parent     » topic index » view message » categorize

21. Re: Cannot Get Win32Lib to Work

That would be so cool!

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu