Programming detective work
-
AFAIK the only differences between the editions have to do with templates, IDE features and the like. All use the same vc6 compiler engine. There are likely differences from one service pack to another, but not one visual studio "version" to another.
Thanks for the reply. I can say that I've looking into it (PE headers) without success...
-
I have a program that I need to find out which compiler produced. I know it was VS6 but can't figure out if it was the Standard, Professional, or Entreprise editions. Does anyone know where on the PE header (or elsewere) that information could be found?
Franc Morales wrote:
Does anyone know where on the PE header (or elsewere) that information could be found?
I think the linker puts some information in there (e.g., date), but not the compiler.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
-
Franc Morales wrote:
Does anyone know where on the PE header (or elsewere) that information could be found?
I think the linker puts some information in there (e.g., date), but not the compiler.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
Yes, I've found linker information but still no way to differentiate the editions based on the PE header. My mistake, I fear. What is clear, though, is that the binaries produced by different editions are different. There must be a way to tell them appart... aside from the evident difference in size.
-
I have a program that I need to find out which compiler produced. I know it was VS6 but can't figure out if it was the Standard, Professional, or Entreprise editions. Does anyone know where on the PE header (or elsewere) that information could be found?
The only thing I can think of is that the less-expensive versions of the compiler didn't do optimizations. But that fact wouldn't show up in the PE header, you'd have to analyze the compiled code.
--Mike-- Visual C++ MVP :cool: LINKS~! CP SearchBar v3.0 | C++ Forum FAQ I work for Keyser Söze
-
The only thing I can think of is that the less-expensive versions of the compiler didn't do optimizations. But that fact wouldn't show up in the PE header, you'd have to analyze the compiled code.
--Mike-- Visual C++ MVP :cool: LINKS~! CP SearchBar v3.0 | C++ Forum FAQ I work for Keyser Söze
Yes, I have reached a similar conclusion. Thank you for the reply.
-
Yes, I've found linker information but still no way to differentiate the editions based on the PE header. My mistake, I fear. What is clear, though, is that the binaries produced by different editions are different. There must be a way to tell them appart... aside from the evident difference in size.
I think the differences you are observing is the embedded timestamp. Every time you compile a program, the .exe is different! It doesn't matter if the source code changed or not. MS executable programs (PE format) do not lend themselves to being binarily compared after they have been recompiled.
-
Yes, I have reached a similar conclusion. Thank you for the reply.
Can you infer the version based on referenced assemblies? Aren't there some assemblies that aren't added automatically to projects in the different versions and doesn't the enterprise version have some assemblies not normally available in the other versions?
-
Can you infer the version based on referenced assemblies? Aren't there some assemblies that aren't added automatically to projects in the different versions and doesn't the enterprise version have some assemblies not normally available in the other versions?
Referenced assemblies? In VC6? This app is all native code.
-
Referenced assemblies? In VC6? This app is all native code.
Doh! Guess who weren't readin' too good... Oh OH! I read this http://msdn2.microsoft.com/en-us/magazine/cc301805.aspx[^] In the IMAGE_OPTIONAL_HEADER there are linker version bytes:MajorLinkerVersion and MinorLinkerVersion. MajorLinkerVersion The major version of the linker used to build this executable. For PE files from the Microsoft linker, this version number corresponds to the Visual Studio version number (for example, version 6 for Visual Studio 6.0). BYTE MinorLinkerVersion Otherwise you can do some figuring from linker options that were added/changed in succeeding versions (like /merge?) or perhaps defaults that were used in specific versions? Like didn't the VS6 linker start sections at the same offset which produced larger exe's than the previous version? And while you don't have references, can you look at the run time libraries that are linked in? I hope this redeems me somewhat and helps you somewhat :)
-
Doh! Guess who weren't readin' too good... Oh OH! I read this http://msdn2.microsoft.com/en-us/magazine/cc301805.aspx[^] In the IMAGE_OPTIONAL_HEADER there are linker version bytes:MajorLinkerVersion and MinorLinkerVersion. MajorLinkerVersion The major version of the linker used to build this executable. For PE files from the Microsoft linker, this version number corresponds to the Visual Studio version number (for example, version 6 for Visual Studio 6.0). BYTE MinorLinkerVersion Otherwise you can do some figuring from linker options that were added/changed in succeeding versions (like /merge?) or perhaps defaults that were used in specific versions? Like didn't the VS6 linker start sections at the same offset which produced larger exe's than the previous version? And while you don't have references, can you look at the run time libraries that are linked in? I hope this redeems me somewhat and helps you somewhat :)
He's looking to know whether it was a standard or professional edition compiler IIRC - not 6 vs 7 or 8.
-
Doh! Guess who weren't readin' too good... Oh OH! I read this http://msdn2.microsoft.com/en-us/magazine/cc301805.aspx[^] In the IMAGE_OPTIONAL_HEADER there are linker version bytes:MajorLinkerVersion and MinorLinkerVersion. MajorLinkerVersion The major version of the linker used to build this executable. For PE files from the Microsoft linker, this version number corresponds to the Visual Studio version number (for example, version 6 for Visual Studio 6.0). BYTE MinorLinkerVersion Otherwise you can do some figuring from linker options that were added/changed in succeeding versions (like /merge?) or perhaps defaults that were used in specific versions? Like didn't the VS6 linker start sections at the same offset which produced larger exe's than the previous version? And while you don't have references, can you look at the run time libraries that are linked in? I hope this redeems me somewhat and helps you somewhat :)
Thank you for putting time into this. As another poster said, I am trying to determine which version of VS6 was used. It turns out that the hearders don't contain that information _or_ that information is included in an undocumented fashion. I can tell you that tools such as PE Explorer see no difference between editions. You are right about the linker start sections, these vary. However, I have not been able to determine how it conclusively applies to each edition. To my knowledge, run times don't change. I was familiar with the link but, nonetheless, thanks again for putting time into this.
-
I have a program that I need to find out which compiler produced. I know it was VS6 but can't figure out if it was the Standard, Professional, or Entreprise editions. Does anyone know where on the PE header (or elsewere) that information could be found?
-
I have a program that I need to find out which compiler produced. I know it was VS6 but can't figure out if it was the Standard, Professional, or Entreprise editions. Does anyone know where on the PE header (or elsewere) that information could be found?
I've read this entire thread and unfortunately I don't have any insight as to your problem. However, the thread did pique my interest. I am curious as to why you would need to know this information? I can somewhat understand needing to know which version of a compiler was used but why woudl you possibly need to know what edition?
-
Have you tried PEiD: http://protools.cjb.net/[^]
Unfortunately, it did not help me on this particular endeavour. Still, I didn't know about this tool. Much, much appreciated.
-
I've read this entire thread and unfortunately I don't have any insight as to your problem. However, the thread did pique my interest. I am curious as to why you would need to know this information? I can somewhat understand needing to know which version of a compiler was used but why woudl you possibly need to know what edition?
It is a freak situation involving lost source code that, depending on the edition, could be located on a different part of the planet... and, so far, it is looking quite grim....
-
Unfortunately, it did not help me on this particular endeavour. Still, I didn't know about this tool. Much, much appreciated.
-
My next thought.... thanks for putting time into this.