In most cases when a firearm is long since out of production, the manufacturer will refer you to a alternative repair and parts shop or numirch arms etc.
But if the replacement parts are not available then you are SOL and now have a $600 -$1000 paper weight, or are forced to sell it online as a parts or junk gun.
So unless you are dealing with an 1911, browning hp , colt peace maker etc. its not always wise to spend a lot on some of these, out of production guns like the SW 5906, HK P7, Star, Berretta etc.
If you pay around the $250 - $300 mark then its a gamble on a lot of these guns for parts or how long they will last.