What is the difference between these two declarations?
Code:
[DllImport("user32.dll")]
public static extern int FindWindow(string lpClassName, string lpWindowName);
Code:
[DllImport("user32", EntryPoint = "FindWindowA")]
private static extern IntPtr FindWindow(
[MarshalAs(UnmanagedType.LPStr)] string lpClassName,
[MarshalAs(UnmanagedType.LPStr)] string lpWindowName);
Re: What is the difference between these two declarations?
The first one I understand.
The second one im not sure what these items mean
1. EntryPoint =
2. IntPtr
3. MarshalAs(UnmanagedType.LPStr)
can someone explain those three items and how they are different from the first one?
Re: What is the difference between these two declarations?