NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Error at calling 'GetWindowRect' from 'user32.dll'

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

Download All
0 Kudos
Message 1 of 2
(823 Views)

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.

0 Kudos
Message 2 of 2
(771 Views)