You can convert a pistol into a carbine but you cannot simply add a stock to a pistol without it being a short barreled rifle.
Those carbine conversion kits (Glock or 1911) have a barrel that is 16" or greater that must be installed first on the pistol in order to remain legal. Once the carbine length barrel is in place you can install a buttstock.
Adding a foregrip to a pistol makes it an AOW.
Thanks for clearing that up Shay. I knew I had read something but couldn't find it anywhere. Specifically it was regarding one of those crazy Select Fire HK Pistols from the 70's or 80's