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.
Image File
Moderator: wriedmann
Re: Image File
Chris Pyrgas
XSharp Development Team
chris(at)xsharp.eu
XSharp Development Team
chris(at)xsharp.eu
Re: Image File
Chris,
Robert
A long time ago. In 2016.Chris wrote: Wed Feb 26, 2025 12:48 pm I am not sure when Robert made this adjustment, but it solves all related issues.
Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
The Netherlands
robert@xsharp.eu
Re: Image File
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...
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
XSharp Development Team
chris(at)xsharp.eu

