Moving To Discord:

Hello everyone, due to bugs with the forum software that I do not have time to care about, I am going to be shutting down these forums and moving my discussions to Discord instead. I will eventually keep releases here on the site but the forums will be removed sooner or later. I encourage people to join my personal Discord if you have questions, if you are looking for any of my projects, etc.

Registration Code (Part 1): w%kQ6
Registration Code (Part 2): b<#$1[*(cw~
In order to register on this forum, you must use the codes above. Combine them into one code (copy paste).

Steamless under Linux/Mono

SteamStub DRM remover that unpacks SteamStub DRM protected games.
Posts: 2
Joined: Mon Jan 16, 2017 8:34 pm

Steamless under Linux/Mono

Post by kornos » Mon Jun 05, 2017 9:35 am

Hello At0m0s

I am trying to port Steamless under Linux/Mono. I am using Mono 5.0.1 (Roslyn compiler).
The (modified) source is compiling, however the program crashes under Mono.
I think it has to do something with the marshalling of the structure when using LayoutKind.Explicit.

I managed to reproduce the problem using this testcase:
It compiles fine on win and linux , runs ok on win , but it crashes under linux.

Can you shed some light on this problem? It is a mono bug?
Can I replace Layout.Kind.Explicit with LayoutKind.Sequential,Pack=1 or the alignment will be compromised?

Thanks a lot.
User avatar
Site Admin
Posts: 450
Joined: Sun Jan 04, 2015 11:23 pm

Re: Steamless under Linux/Mono

Post by atom0s » Mon Jun 05, 2017 10:00 am

I can't assist with the Mono/Linux aspect of this since I don't use either of them. I do know Mono has its limitations on what it will and wont allow from the normal .NET framework. So this could be a limitation on that regard.

Mono has a page covering interop here:

It may have something useful in it to determine what kind of bug you may be hitting.

As for changing the layout kind, you could try 'LayoutKind.Sequential, Pack = 1' as it should have a similar result to what the explicit version is doing with the field offsets. Another thing that could be done instead of using the structure is manually reading the information from the data since the offsets are considered 'well-known' and not going to change for Windows PE file format.
Need a great web host? Check out:

Donations can be made via Paypal:

Who is online

Users browsing this forum: No registered users and 0 guests