It has to be installed as a component rather than just cut and paste the code, if I'm reading you question correctly Okay, that's what I did, I just cut and pasted the code. Bad move, eh?
Well, if it's like an Active X control or a running program, the component itself should be placed in the root directory of the web.
From there it needs to be installed/inserted as a component for it to run.
Again, that's if I'm understanding correctly what you are trying to do