Using Spin lock instead of using RaiseTpl() to prevent UnloadImage() re-entrance.