I got the workspace to compile successfuly under VS2017 community using the Windows 10 SDK.
However upon starting the game, it crashes in snd_play_snd.
The call stack seems to be corrupted, however.
Call graph up until crash is:
Winmain -> play_movie -> SVidPlayBegin
Commenting out the videos just makes it crash later in UiTitleDialog.
Do you think it's even possible to make Diablo.exe work with this modern toolchain without recompiling diabloui.dll and storm.dll as well?
Thanks for the great work!
I traced the crash in x64dbg. The stack corruption appears to be caused by a jump to a bad memory location in Storm.dll.
Here's the call stack for the call to SVidPlayBegin.
Jump to bad memory location
Storm.SBltROP3 (313)
Storm.SGdiRectangle (388)
Storm.SDrawClearSurface (343)
Storm.SVidPlayBegin (454)
Diablo.play_movie
Diablo.Winmain
When I skip the movie, I'm unable to trace the whole call stack, but I found the end of it.
Jump to bad memory location
Storm.SCodeExecute (334)
Storm.SBltROP3 (313)
DiabloUI.???
...
I feel it's likely related to this, but I wouldn't know what to do about it.
http://qstuff.blogspot.com/2006/01/real-life-fun-sbltrop3-bug.html
@StephenCWills Wow! Great find. That was it!
Set Linker option /NXCOMPAT:NO
Et, voila. Diablo runs!
The setting is in Linker -> Advanced -> Data Execution Prevention (DEP)
Set this value to No (/NXCOMPAT: NO)
That's great! It's likely the same issue on VS2008/2010 as well.
Since Storm is interchangeable, I wonder if using a newer version from say WC3 would have less issues?
Do you mean in general or relating to this particular bug?
In general; the storm api used in all blizzard games from 2000-2003 seem to use a build from 1999. Certainly they've updated it since then, to address compatibility with DEP and newer systems.
Well, I have WC3 installed, so I tried it just now. Unfortunately, I get this.

Ah, so they've probably deprecated many of the older network/windows functions, hence why the old titles continue using the 1998 build.
Edit: SMemZero @ 494
I added a section to the readme: #71
How do you open project in VS 2017? When I try to do it, I have error "_file_ has been corrupted and cannot be opened."
_file_ are: Diablo.dsp, DiabloUI.dsp, Storm.dsp
@Saibamen I simply opened Diablo.dsw, then Visual Studio upgraded the project files.
Doesn't work for me.
Visual Studio 15.7.4
Win 10.0.17134.112
Weird. I have the same versions.
Visual Studio Community 15.7.4
Win 10.0.17134.112
Maybe clone the repo and try again?
I think there was a custom storm.dll that resolved all these things. I don't remember though. I could look for it.
I think it was the hell team that is using it... They are using a storm2.dll or something that is custom for their uses....
EDIT:
I think Ladislav has his version up... Are you not wanting to walk with a custom version?
I think if you planning to compile with VS2017 , then you will have custom diablo at any result.
I personally will be using only VS2005 or the origional.
From what I know the difference between regular storm.dll and the hell team's storm2.dll might be only the name, the hell 2 is using sn2 extension instead of snp so can't see why storm2 would be any different
Added via #93
Most helpful comment
The setting is in Linker -> Advanced -> Data Execution Prevention (DEP)
Set this value to No (/NXCOMPAT: NO)