I'm sure there is, but that's a SharePoint SDK question. Look at the SharePoint SDK and you should find examples of code to do that. Probably a search on MSDN for "SharePoint SDK checkin checkout" would yield some links. Sorry, I can't be more helpful.