Very first research I did after we got online about 12 years ago was how to deal with an indoor carpenter ant problem. Found a university (Michigan?) professor's web site with a recipe of equal parts canned dog food (the greasier, the better) and cheap jelly, with a touch of boric acid. Idea being, as others have said, to kill the queen. This was actually an exterminator's advice; he said we were wasting our money on monthly service and suggested we invest some time in getting to the nest.
So, it was really interesting -- lengthy, but interesting -- to watch the larger and larger ants do the 'gathering' as the smaller ones obviously began to die off. Eventually, the guys that were coming out approached a good inch and a half or better in size. Creepy, and oh so hard to gulp and look the other way so they could take the bomb back to Her Majesty. Finally, after countless weeks, no more ants, and I've never seen another one since.I know that, theoretically, carpenter ants don't do sugar/grease like the little red guys, but all I can say is it worked for ours.
Key is, again, patience. My husband was of the more-is-always-better philosophy, no matter what the project, so we got nowhere fast when he was busy overdoing the boric acid. I finally took over the cooking and we made progress.
Good luck!