Smart Device Functions:
Type a page name and press Enter. You'll jump to the page if it exists, or you can create it if it doesn't.
To create a page in a module other than user32, prefix the name with the module name and a period.
[DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Auto)]
<DllImport("user32.dll", CharSet:=CharSet.Auto)> _
Alternate VB.NET Signature:
Public Declare Auto Function GetClassName Lib "User32.dll" (ByVal hwnd As IntPtr, _
Public Declare Function GetClassName Lib "user32" Alias "GetClassNameA" _
In .NET Framework 4.0, only CharSet.Ansi seems to produce the result.
The return type int seems to crash the .NET application in 64-bit mode (occasionally), long seems to work better. Maybe it should even be IntPtr? Please modify this note if you have more insights.
Tips & Tricks:
Please add some!
C# Sample Code
private static bool isIEServerWindow(IntPtr hWnd)
VB.NET Sample Code
Create a new VB .NET form and add a button Button1 to it.
Private Sub Button1_Click(ByVal sender As System.Object, _
Alternative Managed API:
The ManagedWindowsApi project (http://mwinapi.sourceforge.net) provides a
class ManagedWinapi.SystemWindow that has a ClassName property.
Click to read this page
4/6/2008 7:23:14 AM - anonymous
An IntPtr is a pointer to a memory location (unmanaged) that adapts to the platform it is running on (64-bit, etc.) UNLIKE a standard int/Integer. You should always use this type for unmanaged calls that require it, even though an int will appear to work on your development machine.
1/13/2008 4:00:13 AM - Damon Carr-184.108.40.206
3/31/2008 6:53:29 AM - -220.127.116.11
Please edit this page!
Do you have...
Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more).