I've done some research and came up with this idea.
1)You can download an application from this address
http://babgvant.com/files/folders/misc/entry8759.aspx.
2)This is written in C# so first of all change the application output type to class library and compile it and Add output dll to your application.Or add this project directly to your solution
3) You can call babgvant.DSSnap.DSThumbnail.GrabWithSG method.
or you can directly use
http://babgvant.com/files/folders/misc/entry8759.aspxor change the code
Hope it works this time.