Image File

Deutschsprachiges X#-Forum – German language forum

Moderator: wriedmann

User avatar
Chris
Posts: 5630
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

Re: Image File

Post by Chris »

Guys,

Btw, _GetInst() now works also for resources inside dll files, because it is not directly calling a runtime function, instead the compiler automatically translates calls to _GetInst() to inline code that returns this:

Marshal.GetHINSTANCE(typeof(Functions):Module)

"Functions" in this case is a type defined in that same dll, so _GetInst() always returns the correct instance.

I am not sure when Robert made this adjustment, but it solves all related issues.
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
User avatar
robert
Posts: 5041
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

Re: Image File

Post by robert »

Chris,
Chris wrote: Wed Feb 26, 2025 12:48 pm I am not sure when Robert made this adjustment, but it solves all related issues.
A long time ago. In 2016.

Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
User avatar
Chris
Posts: 5630
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

Re: Image File

Post by Chris »

Robert,

Ah OK, some time ago I had a similar issues with resources in another app, so I had assumed it was due to _GetInst() in dll files, but apparently it was a different issue. Or maybe it was the icon class declaration (calling _GetInst()) that was in a different assembly than the dll with the resource...
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
Post Reply