I don't understand this. I imported RegisterClassEx with the WNDCLASSEX structure marshaled as [System.Runtime.InteropServices.In, System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.Struct)] ref ClassDef newClass
(where ClassDef is a struct implementing the WNDCLASASEX). In that implementation, the function fails and GetLastWin32Error returns an error about file path syntax. Since such an error doesn't make sense for RegisterClassEx, I am assuming it failed to find
the DLL, but that doesn't make sense. Nor does the Marshal class's instance that I use Struct rather than LPStruct. (The official declaration for the parameter is as a
pointer to a struct, not the struct itself.)
Any ideas? I am doing this because I need a top level window that isn't a form.
View Complete Post