Unfortunately, neither of the two commenters above are correct.
edit - except for RawheaD
First, there is no way you can remove an m42 lens *with* adapter attached. Aint gonna happen. You first unscrew the lens, then take off the adapter - it's locked inside the bayonet, and is locked in a different way than usual k-mount bayonets.
Then, there is no possibility of a ricoh pin in m42 lens.
Now, about your adapter. Is it genuine? Also, what is the lens? I had a Fujinon 55/1.8 that once got stuck, and problem sounds similar to yours. Mine just had a nudge in the base of the lens, that "clicked" into the lens lock (that usually has no effect on m42's since their bases are flat). Pressing the lens release while unscrewing the lens helped.
To get the adapter off, here's what you have to do. Either get a pen, or a relatively thin stick. The adapter has a small metal plate that locks it into place. Put the pen there and depress the plate, then push the adapter counter-clockwise. Should do it.