tags:

views:

25

answers:

1

is there a way to produce com file(pure binary) from vc++ ,i dont want the exe headers, bcoz i need to develop codes for operating system...

please dont suggest gnu compiler...

A: 

The last version of Visual C++ that could create COM files was VC++ 1.52c. As far as I know, the only (legitimate) way to get a copy anymore is via a subscription to MSDN. Be aware that the compiler is quite primitive by modern standards (e.g., no support for templates at all).

Jerry Coffin
thanks jerry I am using 1.52c , but wanted to do things in vc++ 2010.
In that case, about the only thing I can think of would be to run your code through the normal VS toolchain to produce a normal Windows executable (with the preferred load address set to where you want it). You could then use `CreateProcess` to create a (suspended) process from the executable, then save a copy of the process' executable section(s) after they're mapped to memory. It's not straightforward, but still *probably* workable if you really want to.
Jerry Coffin