Go Back   Winamp Forums > Developer Center > Winamp Development

Reply
Thread Tools Search this Thread Display Modes
Old 24th January 2003, 20:32   #1
bobajobrob
Junior Member
 
Join Date: Jan 2003
Posts: 2
FindWindow from an ATL COMponent

Hi,

First of all I would like to apologise if this has been asked before.

I'm trying to create a component to control an instance of winamp from an asp script. I've got this far:

code:

STDMETHODIMP CRemote::GetHWND(LONG * hwnd)
{
HWND hwndWinamp = FindWindow("Winamp v1.x",NULL);
*hwnd = (long)hwndWinamp;
return S_OK;
}



The FindWindow method code works fine from a normal console executable, but from a COM object it always returns 0. I know it is something to do with permissions, as asp is running under the restricted IUSR account. I'm sure I can do something simple to make this work and I'm not terribly concerned about security at this stage.

Please help me out.
Thanks for your time,

Rob.
bobajobrob is offline   Reply With Quote
Old 7th February 2003, 18:57   #2
lancegoodwiggle
Junior Member
 
Join Date: Feb 2003
Posts: 7
Send a message via AIM to lancegoodwiggle
I would try changing the context that IIS runs in to Local System account and enable interaction with the desktop. Should be able to find this in the Services section of Administrative Tools.

Finding windows might constitute "interacting with the desktop", so this could be where the block is.

There are also options in the IIS administrator to change the isolation level of ASP scripts. That might be a place to look. You could create a new virtual directory with different security settings and put your ASP script there.

Hope this helps.
lancegoodwiggle is offline   Reply With Quote
Old 18th February 2003, 07:25   #3
bobajobrob
Junior Member
 
Join Date: Jan 2003
Posts: 2
I found that IIS was already running as SYSTEM, but I checked 'allow interacton with desktop'. I had to also change the isolation level to low, as you said, for my virtual directory.

Thanks, it worked a treat!
bobajobrob is offline   Reply With Quote
Reply
Go Back   Winamp Forums > Developer Center > Winamp Development

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump