Well you forgot to call GlobalFree which might be a big memory leak if the user pastes alot of data. However, just let the people do it theirselves.. Using windows APIs is c&p from msdn. If they cant manage to find something that simple on the net then I have no idea if that helps in any way sorry