NO

Author Topic: How to convert this sh*tcode to C?  (Read 11514 times)

Offline John Z

  • Member
  • *
  • Posts: 865
Re: How to convert this sh*tcode to C?
« Reply #15 on: November 26, 2023, 11:13:45 AM »
frankie, TimoVJL,

Amazed, but not surprised, you guys got this working in plain C!
I looked over the original sources posting and my eyes started watering,
what a mess IMO.

I don't know if I'll ever use it but downloaded it in case I need something
like a nightmare to keep me awake  :) or maybe just make me comatose  ;)

John Z

Offline bitcoin

  • Member
  • *
  • Posts: 179
Re: How to convert this sh*tcode to C?
« Reply #16 on: November 26, 2023, 01:29:45 PM »
Thank you  frankie!

TimoVJL, can you install microsoft edge in win7? May be this technology don't wort below win8?

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2123
Re: How to convert this sh*tcode to C?
« Reply #17 on: November 26, 2023, 01:38:05 PM »
My example was developed in Windows 7, but you need WebView2 Runtime
Distribute your app and the WebView2 Runtime

In WebView2Test1_WS_dl.zip is for Deepl and it have minimal WebView2.h
« Last Edit: November 27, 2023, 09:20:49 AM by TimoVJL »
May the source be with you

Offline Vortex

  • Member
  • *
  • Posts: 871
    • http://www.vortex.masmcode.com
Re: How to convert this sh*tcode to C?
« Reply #18 on: November 26, 2023, 03:25:22 PM »
Hi Timo and Frankie,

WebView2 runtime is installed on my Windows 7 system and I managed to run the application,many thanks.

Some academical \ philosophical questions :

What obligated M$ to invent this ugly beast of COM? Why plain API cannot to the job of COM? Are there some commecial benefits behind the creation \ invention of COM?

Quote
Everything should be made as simple as possible but not simpler.
- Albert Einstein

Quote
"Any intelligent fool can make things bigger,
more complex, and more violent.
It takes a touch of genius -- and a lot of courage --
to move in the opposite direction."
- E. F. Schumacher

Quote
A designer knows he has achieved perfection
not when there is nothing left to add,
but when there is nothing left to take away.
- Antoine de Saint Exupery

http://oby.ro/
« Last Edit: November 26, 2023, 06:18:37 PM by Vortex »
Code it... That's all...

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2123
Re: How to convert this sh*tcode to C?
« Reply #19 on: November 27, 2023, 10:06:03 AM »
It was important part of Visual Basic developments from beginning and useful for OOP languages.
Sadly it also leads to bigger programs.

https://en.wikipedia.org/wiki/Component_Object_Model
May the source be with you

Offline Vortex

  • Member
  • *
  • Posts: 871
    • http://www.vortex.masmcode.com
Re: How to convert this sh*tcode to C?
« Reply #20 on: November 27, 2023, 09:17:42 PM »
Old but an interesting thread :

Quote
The Unix model is built around the idea of lightweight processes that communicate with each other, through sockets, pipes, signals, and command lines. Historically, Unix didn't have threads (the POSIX thread model is only about 10 years old IIRC), but processes on Unix have always been much cheaper than on Windows, so it was more performant to factor functionality into separate executables than to allow a single program to grow large and monolithic.

In COM, you define binary interfaces that allow shared-memory communication. COM is tied to an object-oriented paradigm. In the classic Unix model, you define stream-oriented interfaces that allow communication over pipes, without shared memory. Conceptually, this is much closer to a functional programming paradigm.

The Unix model encourages making small programs that can be easily coupled together by a lightweight "shell", while the COM model encourages making large programs that expose "components" that can be reused by other large programs. It's really an apples-and-oranges comparison, since both models provide benefits and drawbacks for different scenarios.

Of course, modern Unix systems can have COM-like facilities. Mozilla has XPCOM, a cross-platform framework built on the same principles as COM. GNOME for a long time used Bonobo, which is conceptually very similar to Microsoft OLE, which was the forerunner to COM. But recent versions of GNOME have been shifting away from Bonobo in favor of D-Bus, which is more of an event/messaging pattern.

https://stackoverflow.com/questions/3063321/is-there-an-equivalent-to-com-on-nix-systems-if-not-what-was-the-nix-approa
Code it... That's all...

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2123
Re: How to convert this sh*tcode to C?
« Reply #21 on: November 29, 2023, 04:53:53 PM »
Those, who want to develop it further  :)
« Last Edit: November 29, 2023, 05:30:45 PM by TimoVJL »
May the source be with you

Offline Vortex

  • Member
  • *
  • Posts: 871
    • http://www.vortex.masmcode.com
Re: How to convert this sh*tcode to C?
« Reply #22 on: November 29, 2023, 06:57:09 PM »
Hi Timo,

Thanks, your application works fine on Windows 7 with WebView2Loader.dll
Code it... That's all...

Offline WiiLF23

  • Member
  • *
  • Posts: 89
Re: How to convert this sh*tcode to C?
« Reply #23 on: September 30, 2024, 06:01:40 PM »
Very late to this, but this is fantastic. It looks great! I couldn't' believe it. Digging further, it appears you can add link callbacks to trigger actions after a link href is clicked within the viewport. This is useful for launching windows or managing calls within the application.

However, this binds one to the Edge eco-system, which is already aggressive in marketing and overriding associations from other browsers in the registry. No Edge, no WebView2.

Very cool! Thank you.
« Last Edit: September 30, 2024, 06:07:23 PM by WiiLF23 »