10-20-2023 08:08 AM
Hello,
I use TestStand 2017 and LabVIEW 2018.
I try to calling function GetWindowRect from user32.dll.
https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getwindowrect
It works fine when I call the function via LabVIEW adapter (first variant in attached file GetWindowRect.seq).
When I try to call it directly via C/C++ DLL adapter (second variant in attached file GetWindowRect.seq) I get a Run-Time Error shown in attached file Run-Time Error.png. Anything isn't right with the Pointer/Handle of parameter lpRect.
Does anybody know what could be the reason for this Run-Time Error?
Best regards
Christian
10-24-2023 01:07 AM
I was able to solve the problem. C Struct Passing was not defined in the Custom Data Type LPRECT.
I have defined the C Struct Passing with the right datatype I32 and then set parameter in function call to category C Struct and pass By Pointer (*). So it works now.
Corrected version in attachment.