From: lmd2 on
Thanks Rolf yes both arrays are of fixed lengthI should be OK nowHave a great daylmd2
From: lmd2 on
Rolf
In LabVIEW 7 when I configure the CLFN, even though I am sending in an array of bytes (U8) to allocate space, I will config the parameter not as an array, but adapt to type (I think) or should it be configured as an array? If 'adapt to type' then the data format would be either HANDLES BY VALUE or POINTERS TO HANDLES  -  I am thinking POINTERS TO HANDLES
On the other hand, if the parameter should be configured as an array of bytes, which of the three array formats should I use?
 
thanx
lmd2
From: lmd2 on
ok, adapt to type (any data format) crashes Windows - blue screen of death!!
Array also crashes if data format is array handle, or array handle pointer
the only thing that doesn't crash windows is Array / array data pointer - which returns an error of "invalid buffer"
since this is the only config that doesn't crash LV & WindowsXP I will try and get this config working
 
I am open to suggestions ...
From: rolfk on
lmd2 wrote:ok, adapt to type (any data format) crashes Windows - blue screen of death!!
Array also crashes if data format is array handle, or array handle pointer
the only thing that doesn't crash windows is Array / array data pointer - which returns an error of "invalid buffer"
since this is the only config that doesn't crash LV & WindowsXP I will try and get this config working
 
I am open to suggestions ...Don't use any of the handle versions if all you need is an array pointer. A handle is a pointer to a pointer and also a special LabVIEW data type that can be resized anytime but only with LabVIEw memory manager functions. It is only useful for DLLs specifically written to deal with native LabVIEW datatypes and linking to the LabVIEW memory manager functions for doing that.The array data pointer is the only one that will work of the array types, or you can also use adapt to type and wire in a cluster if you are sure that that cluster is completely flat. A flat cluster is a cluster that contains only skalars (integers, floats, booleans) and other clusters with the same restrictions. Adpat to type will cause LabVIEW to pass the pointer to the memory area of that cluster to the DLL. For arrays and strings it will always pass the handle or the reference to the handle depending on the configuration.The invalid buffer could be just an error caused by the fact that you do not yet have the correct information filled in. For instance some Windows API functions take structures whose first element is and integer indicating the size of the structure in bytes. Even if the function is supposed  to only return data in that cluster does it normally require that the caller has filled in that size element before passing it to the function.Of course other inconsistent information in the cluster might also cause such an error.Rolf Kalbermatter
From: lmd2 on
Hi Rolf
this still isn't working, and after discussing it with my client, it turns out that one of the two arrays isn't fixed length. The cluster contains:
U16, U16, U32, U32, U16, U16, U16[3], U16, U16, U16[1]
he explained that even though it isn't defined as a pointer, the second array is open-ended and only points to the first element
This complicates this, you mentioned
"in the second case you have to treat it as an uInt32 (uInt64 on the upcoming LabVIEW for Windows x64 platform) and do some other magic if you need to retrieve the values."
is this documented somewhere (like a white paper?) or could you possibly eleaborate??
sorry, I really appreciate your help on this,
thanx
lmd2
 
First  |  Prev  |  Next  |  Last
Pages: 1 2 3 4 5 6 7 8 9 10
Prev: error 200279
Next: CMD.EXE Output Not Showing up