The imac expects a mini-displayport input connection for target display mode. You need a converter to convert the video out from your pc to mini-displayport to send to the imac. I suspect what you got is a simple mini-displayport to hdmi adapter of which there are plenty to choose from. Problem is these devices are not bidirectional. What you need is a hdmi to mini-displayport converter/adapter and there are a lot less choices for these.