My program need to print a curve, my solution is changing the curve into a picture, and this picture file (xxx.png) can be printed by using the default windows picture print
rundll32 C:\WINDOWS\system32\shimgvw.dll,ImageView_PrintTo "c:\mydir\my.bmp" "Fictional HP Printer"