Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
FindWindow, and other hwnd based programs...
Message
From
07/04/1998 13:13:43
 
 
To
All
General information
Forum:
Visual Basic
Category:
Windows API functions
Title:
FindWindow, and other hwnd based programs...
Miscellaneous
Thread ID:
00090210
Message ID:
00090210
Views:
69
I am running NT Workstation 4.0, w/SP3, and Vis. Basic EE w/SP3.
The following code should simply print the Window handle of the process matching both the class name and or the caption parameter.

lpClassName$ = "SciCalc"
lpCaption$ = "Calculator"
Debug.Print "Handle = "; FindWindow(lpClassName$, 0&)
Debug.Print "Handle = "; FindWindow(0&, lpCaption$)
Debug.Print "Handle = "; FindWindow(lpClassName$, lpCaption$)


This is code taken directly from Microsoft's Knowledge Base. Yet the first encounter with the API FindWindow causes an err = 53,
error= "File not found: User"

The same error occurs if you call GetDesktopWindow() - an API to return the handle of the desktop's window.

I have never encountered this problem before, but the last time I needed it, I was not running NT 4.0. We thought it might be a policies issue, and we modified the policies of the user logged into the workstation, along with simply trying to run the program from the "Administrator" logon.

Any of you out there who might have encountered this problem and have a suggestion or solution, please respond.

Thanks,

Jeff

:-<)
Jeffrey B. Hamlin
:-<)
Next
Reply
Map
View

Click here to load this message in the networking platform