There is a separate immigration gate in the transfer gate. Is your bag checked through to CM? If so 2 hours is ample. Done it a few times. If baggage is not checked through you will need to clear immigration at BKK. Then it in the hands of the queues.
If you are from the UK you can apply for international by post. And ask someone to post it to you. Remember you can only use an international for 90 days.
I have invited 3 ladies to my home. Not girlfriends. Both had jobs and homes. I wrote a letter of invitation and specified travel dates. All 3 got the visa with no agency.