Page 1 of 1

WinAPI, MASM and Visual Studio

Posted: Wed Nov 18, 2015 10:59 pm
by Hysteria
Hi Guys

While our fantastic PB supports inline assembly and easy WinAPI support, I've been wanting to play around with MASM (or ML) using VS2015 just for fun. Like many of you I enjoyed many hours of 8 and 16bit assembly coding back in the day (tempted to say 'good old days' :) )

Anyway, while the assembly language bit makes sense and VS offers lots of great debugging features to see what's going on, I really want to get some windows I/O going. What could be easier than a MessageBox I thought? Microsoft must have made the necessary libraries and headers available as they are to every other MS supported language...Well, it seems not :lol:

What made it worse was the many examples that I found on-line that purported to show me how to do this only to find they all relied on third-party libraries/definitions. The unfortunately (in my case) named MASM32 confused me a lot as I assumed it was the 32 bit version of the MASM but eventually figured out it was a third-party add-on...

So, for anyone not asleep already, I wondered if any of our resident assembly geniuses here could provide me a simple example that could be used verbatim in a current version of VS, with only Microsoft's 'MASM' installed which shows a basic dialogue box such as a message requester. I'm not a C expert so I feel, reverse-engineering its header files would take me forever. However if someone could show me how you can go from the C-based WinAPI syntax to something that will compile and link (to an exe) in MASM, it would be extremely useful.

Any help would be much appreciated!

Thank you so much!

Hysteria

Re: WinAPI, MASM and Visual Studio

Posted: Wed Nov 18, 2015 11:57 pm
by normeus
Steve Gibson from GRC and the famous Spinrite has a tutorial or two using MASM on this page

https://www.grc.com/smgassembly.htm

Re: WinAPI, MASM and Visual Studio

Posted: Fri Nov 20, 2015 1:40 pm
by Hysteria
normeus wrote:Steve Gibson from GRC and the famous Spinrite has a tutorial or two using MASM on this page

https://www.grc.com/smgassembly.htm
Thanks Normeus, I'll check that out.