WiresmithTech / Rust-LabVIEW-Interop

A crate for creating libraries in Rust that are called from LabVIEW
MIT License
7 stars 5 forks source link

Add checks to valid() on UPtr and UHandle #23

Closed jkneer closed 4 months ago

jkneer commented 4 months ago

Currently valid() on UPtr and UHandle just verifies it is a valid pointer in Rust.

The Memory Manager of Labview offers the functions

It seems like a good idea to include these in the validity check to avoid using a valid pointer, that is not a valid handle or ptr from the viewpoint of the labview memory manager.

JamesMc86 commented 4 months ago

I ended up removing the calls from UPtr valid as it doesn't do anything. I can make up any pointer and it comes back as valid.