Interesting .. considering I tested it with several open drawings and there was no issue. If it becomes an issue, I'd suggest checking the lock status prior to calling the GetBitmap method.
Anyway, I've attached the dll that you can include in your projects. It reads all thumbnails from R14 to R2015 and should read through R2017 because there are no scheduled DWG format changes in the works.
This particular build has one public method GetBitmap and it accepts two parameters, filename and boolean retainBackColor.
A little more research into the preview section in the DWG file indicates that there is the possibility that the image format can be BMP, WMF or PNG (imagetype will be 2, 3, 6 respectively).
Also, the images can have pretty much any valid palette type and it makes a huge difference when swapping the background colors. For now, I've only coded the 8bit palette color swap. If you set retainBackColor to "false" the background will be solid black, otherwise it will be whatever color AutoCAD decides it needs to be.
A bitmap image is returned to the calling function so it can be saved from there or manipulated additionally.
I have found one minor bug in the image extraction. If the AutoCAD drawing window has an aspect ratio of less than 4:3 (roughly) when the preview is saved, the image will be skewed more prominently the closer to 4:3 the ratio gets. Once the ratio exceeds 4:3 (say 5:3), the image is no longer skewed.