
Originally Posted by
Tanner_H
I don't suppose anyone has ever looked at the actual compiled ASM to see how they are actually implemented, rather than hazarding guesses...? (I'd try, but ASM isn't exactly my wheelhouse

)
Just fire oleview.exe and File->View typelib of C:\Windows\SysWOW64\msvbvm60.dll (or whatever navigating to parent typelib in object explorer shows) and locate vbNewLine
Code:
// NOTE: This module has no entry points. There is no way to
// extract the dllname of a module with no entry points!
//
[
dllname("<no entry points>"),
uuid(343DB180-2BCC-1069-82D4-00DD010EDFAA),
helpcontext(0x000f6ebd)
]
module Constants {
[helpcontext(0x000f79aa)] const long vbObjectError = 0x80040000;
[helpcontext(0x0010aa32)] const LPSTR vbNullString = "";
[helpcontext(0x0010aa32)] const LPSTR vbNullChar = "\0";
[helpcontext(0x0010aa32)] const LPSTR vbCrLf = "\r\n";
[helpcontext(0x0010aa32)] const LPSTR vbNewLine = "\r\n";
[helpcontext(0x0010aa32)] const LPSTR vbCr = "\r";
[helpcontext(0x0010aa32)] const LPSTR vbLf = "\n";
[helpcontext(0x0010aa32)] const LPSTR vbBack = "\b";
[helpcontext(0x0010aa32)] const LPSTR vbFormFeed = "\f";
[helpcontext(0x0010aa32)] const LPSTR vbTab = "\t";
[helpcontext(0x0010aa32)] const LPSTR vbVerticalTab = "\v";
};
All typelib constants (and imports) are "embedded" in the final executable, these are not consulted at run-time so that you can omit shipping the typelib on client machines and there is no way to make vbNewLine platform specific once it is compiled in the executable. Every other implementation option would allow a malicious user to inject whatever strings she would want in your final executable -- not very secure.
cheers,
</wqw>