There is a “research” project to access the msdn-web forums via a nntp-bridge. The offical version is “V1″… but I must say, that it is still Beta1 ๐
For example, there is a bug with the DateTime-Format, which uses the current system locale… This bug was reported severaly months ago, and nothing happend… In january and february it was not a problem, because “Jan” and “Feb” are the same in english and german… but in “Mรคrz” the NntpBridge started to report all postings with “01.01.1970 01:00″… because it will report the date as “Mrz” instead of “Mar”… which is somehow bad…
So I decided to make a quick fix for this behavior. You just need to add the System.Globalization.CultureInfo.InvariantCulture as parameter to the ToString method.
Here are the steps, how you can fix this by yourself:
- Locale the directory of the Nntp-Bridge (normally “C:\Program Files (x86)\Microsoft Community Tools\Microsoft Forums NNTP Bridge”
- Copy the file “nntp.dll” to “nntp_org.dll” so you have the original version saved
- Copy “nntp.dll” into a temporary directory like “c:\temp\nntp_fix”
- Open a “Visual Studio 2005/2008 Command Prompt (x86)”
- Go to the temporary directory (cd /D c:\temp\nntp_fix)
- Disassemble the nntp.dll
ildasm nntp.dll /out=nntp.il
- Now you need to change the content of the nntp.il file
- Find the method “GetMessageFormat” and change it from
.method public hidebysig static string GetMessageFormat(valuetype [mscorlib]System.DateTime dateTime) cil managed { // Code size 28 (0x1c) .maxstack 8 IL_0000: ldstr "{0} {1}" IL_0005: ldarga.s dateTime IL_0007: ldstr "ddd, d MMM yyyy HH:mm:ss" IL_000c: call instance string [mscorlib]System.DateTime::ToString(string) IL_0011: ldsfld string Nntp.NntpTimeUtility::GmtTimeZoneOffset IL_0016: call string [mscorlib]System.String::Format(string, object, object) IL_001b: ret } // end of method NntpTimeUtility::GetMessageFormat
to
.method public hidebysig static string GetMessageFormat(valuetype [mscorlib]System.DateTime dateTime) cil managed { // Code size 33 (0x21) .maxstack 8 IL_0000: ldstr "{0} {1}" IL_0005: ldarga.s dateTime IL_0007: ldstr "ddd, d MMM yyyy HH:mm:ss" IL_000c: call class [mscorlib]System.Globalization.CultureInfo [mscorlib]System.Globalization.CultureInfo::get_InvariantCulture() IL_0011: call instance string [mscorlib]System.DateTime::ToString(string, class [mscorlib]System.IFormatProvider) IL_0016: ldsfld string Nntp.NntpTimeUtility::GmtTimeZoneOffset IL_001b: call string [mscorlib]System.String::Format(string, object, object) IL_0020: ret } // end of method NntpTimeUtility::GetMessageFormat
- Then compile the nntp.dll again (and delete the original dll before compiling (del nntp.dll)):
ilasm /dll nntp.il /resource=nntp.res
- Now you can copy the patched nntp.dll into the original directory (be sure, the application is not running).
Now it looks better:
That’s all! Happy NntpBridging ๐
Awesome on multiple levels!
Nice find. Good job. Works fine. Thanks a lot. ๐
Microsoft has now created a hotfix with my code ๐
You can download it from:
https://connect.microsoft.com/MicrosoftForums/Downloads
Direct-Link:
https://connect.microsoft.com/MicrosoftForums/Downloads/DownloadDetails.aspx?DownloadID=27231