HELP: FindWindow API doesn't work in Server 2003

  • Thread starter Thread starter VB Programmer
  • Start date Start date
V

VB Programmer

I had a VB6 application that worked well in Windows 2000. What it did was
simply look to see if a certain exe (like Notepad.exe) was running. If it
wasn't it ran the application. That's it!

To see if the program was running I used this API:
Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal
lpClassName As String, ByVal lpWindowName As String) As Long

To run the program I used this API:
Public Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA"
(ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String,
ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As
Long) As Long

How can I get this working in Server 2003? It doesn't seem to find the
application running, even if it really is!

Thanks in advance.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top