|
|
Hi all, I am writing a windows service which needs to access Windows Media Player library. My service is running as local system.So it is runing in the syatem account. Now I want to access the WMP library of a perticular user. I have asked this question before and I got some useful guideline like to impersonate the service to a specific user.
The OnStart method of my service starts a thread (MyThread Function). At the begining of My Thread Function I have used impersonation code. The code is taken from the article http://support.microsoft.com/default.aspx?scid=kb;en-us;Q306158.
So My Thread Function is impersonated to the user as specified in LogonUser function of the impersonation code. Is it correct?
After that I am creating the windows media player object. player=new WMPLib.WindowsMediaPlayer();
Now i am tryng
playList = player.mediaCollection.getByAttribute("MediaType", "Video"); iCount = playList.count;
The iCount value is always 0. So I am not getting user specific library. Please help me how to solve this problem.
Thanking you in advance.
Regards Arindam Biswas
|
|
|