FWIW, Glock will tell you officially that Gen5 and pre-Gen5 barrels of all models are not interchangeable. For the G17 and G34 that's definitelty true.
G19 pistols have a subtle technical justification that doesn't apply to any other model.
Pre-Gen5 G19 pistols CHP###US (mid-1997) and later use VAR1 barrels with the slight slope at the front top surface of the barrel hood that allows earlier unlocking of the barrel from the slide during recoil. Glock makes two pre-Gen5 G19 barrels...one with and one without the VAR1 feature. No Gen5 G19 barrels have the VAR1 feature.
There is no doubt some slight difference between pre-Gen5 VAR1 and non-VAR1 slides, because Glock says the.two barrel types are not properly interchangeable. A Gen5 barrel in a pre-Gen5 pistol is essentially using a non-VAR1 barrel.
Another Gen5 barrel characteristic that does not exist in pre-Gen5 pistols is modified polygonal rifling. That was specifically designed to assist forensic identification of which bullet was fired by which weapon after a multiple-pistol shooting event. Such barrels were initially called "marking" barrels until some Glock marketing genius figured out it was better propaganda to claim improved accuracy and to call them "marksman" barrels. I suspect the difference in rifling alone is enough for Glock to adopt the stance that Gen5 and pre-Gen5 barrels are not interchangeable.
Most definitely, pre-Gen5 G17 and G34 barrels are NOT interchangeable with Gen5 versions because the Gen5 versions use a G19-type barrel/slide/frame lockup.
In the world of amateur off-standard FrankenGlock practice, probably none of these details matter, except the last.
