How do i call a ActiveX Dll's methods from Javascript function?

My requirement is to call the Dll's method by passing some parameters and then based on the return value do further processing?