Neither a dinosaur nor a pterosaur today! Sharovipteryx mirabilis was an early gliding reptile from Kyrgizstan's Late Triassic period. Only one known fossil of it exists, and where exactly it lies on the reptile evolutionary tree is still unknown, though it does appear to be related to the very early archosaurs, the line which also gave rise to dinosaurs and pterosaurs. It is not an ancestor of theirs, of course - dinosaurs were already around in the Triassic, after all. Instead, think of it similarly to how lemurs are related to us - they're close relatives of more basal primates, but we did not arise from them.
The original discoverers of this fossil, back in 1971, concluded that the wing membrane did not connect to the hands. However, more recent analyses indicate that if Sharovipteryx did have wing membranes attached to the hands, it could have used that forward gliding surface to more accurately control its flight. Unfortunately the portion of the rock that had contained this membrane was carved away when preparing the fossil, so unless another is found, we may never know for sure how far the membrane actually extended.