LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Win32 call--Possible to use a pointer to a pointer?

I am trying to use the VerQueryValue function in Version.DLL through a code interface node.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/WinUI/WindowsUserInterface/Resources/VersionInformation/VersionInformationReference/VersionInformationFunctions/VerQueryValue.asp

This function takes a block of data, formats it, then returns a long pointer to a long pointer, to the formatted data, ie lplpBuffer. When retrieving lplpBuffer from the output terminal of the code interface node, the "pointer" property performs the abstraction internally and retrieves the first value being pointed to. So the VerQueryValue call returns lplpBuffer, the CIN extracts lpBuffer, and I need to access the memory sp
ace at lpBuffer to obtain the struct of formatted data. Is this possible? Otherwise I am left with a 32-bit useless number and no way to 'peek' at the data it's supposed to be pointing to.

If this is not possible are there any recommendations to overcome this problem? I do have Visual C++ at my disposal...

Thanks....
0 Kudos
Message 1 of 2
(2,560 Views)
I guess when saying Code Interface Node above, you really mean the Call Library Node. Because if you had a CIN you had some C code to write and in there you could do whatever you wanted.
As I have pointed out at other places here you could use a little LabVIEW voodoo to get at this information. Basically you would need to copy as many bytes as the buffer should contain from that pointer to a byte array.

You can do that with a Call Library Node configured to call a documented LabVIEW manager function.

Library: LabVIEW
Function: MoveBlock
Calling Convention: C decl
Return value: void
1. Param: src, uInt32 by value
2. Param: dest, array of uInt8, initialized to length of the structure
3. Param: len, int32, length of the structure

Rolf Kalbermatter
Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 2 of 2
(2,560 Views)