06-07-2023, 10:09 PM
(06-07-2023, 09:44 PM)Ultraman Wrote: I guess the many, many times I've used Declare CustomType Library with zero issues have all been flukes.I'm not saying CustomType is always the wrong thing to use, there are times when it's necessary, what I'm saying is that it's the wrong thing to use here because it doesn't solve the actual problem. CustomType just lets you ignore the C++ types, it doesn't actually fix your declaration to have the right types. In cases like this one the C++ types are quite helpful because they identify if you're passing the right types at compile time and avoid having to debug runtime issues.
Adding CustomType to eroedson's original code wouldn't have made it work correctly, it would have just allowed it to compile.