Hi there, currently I need to dig up some Win32 code which is a part of my project, Actually, it's a part of my WPF application where access Win32 APIs using the traditional Pinvoke method.
But Currently I facing some error at lParam pointer structure.
Here is the piece of code where I face the problem :
MINMAXINFO mmi = (MINMAXINFO)Marshal.PtrToStructure(lParam, typeof(MINMAXINFO));
if (monitor != IntPtr.Zero)
{
MONITORINFO monitorInfo = new MONITORINFO();
GetMonitorInfo(monitor, monitorInfo);
I get red squiggly Line on MINMAXINFO and on MONITORINFO on my Visual Studio 2022.
I hope someone who frequently work with Win32 APIs will able to solve my problem.
Another important point is I already do the necessary DLL imports like
[DllImport("user32" )]
Hope someone able to figure out my problem. I also attached some images for better visualization and better understanding of the problem.
Here is my Full source Code : https://pastebin.com/Y7puGMsZ
I gave the Pastebin link here because posting full source Code may filter by the moderator and bots.
I hope this Microsoft Q & A site content moderation will improve in future, because now a days people facing a lot of problems when they posting any question here, their post will automatically get deleted and comments are filtered and deleted.