LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Changes in Labview.lib between 6.0.2 and 6.1 ?

I recently installed 6.1 and tried to run out test system. The error DSPtrAndHand occured in Labview.lib and lv was shut down. I looked at the labview.lib files both in 6.0.2 and 6.1 and the lib file was twice as big in 6.0.2. I am not an expert on the system but i think that we have an external code that calls the function DSPtrAndHand which seems to be some kind of memcopy. This function seems to have disappeared in 6.1. We have tried to recompile with the new labview.lib and the linker warns that DSPtrAndHand cannot be found.
Br
Johan N
0 Kudos
Message 1 of 4
(2,698 Views)
cornholio wrote:

> I recently installed 6.1 and tried to run out test system. The error
> DSPtrAndHand occured in Labview.lib and lv was shut down. I looked at
> the labview.lib files both in 6.0.2 and 6.1 and the lib file was twice
> as big in 6.0.2. I am not an expert on the system but i think that we
> have an external code that calls the function DSPtrAndHand which seems
> to be some kind of memcopy. This function seems to have disappeared in
> 6.1. We have tried to recompile with the new labview.lib and the
> linker warns that DSPtrAndHand cannot be found.

Yes, this function has disappeared in LabVIEW 6.1. I'm not sure as to
the reason and considering that it was documented in the CIN Reference
Manual in earlier versions, I was rather surprised to see
that.

However the workaround is quite simple by creating your own function to
do that particular operation:

MgErr DSPtrAndHand(UPtr p, UHandle h, int32 size)
{
MgErr err;
int32 len;

if (!h || !*h || !p || !size)
return mgArgErr;

len = DSGetHandleSize(h);
err = DSSetHandleSize(h, size + len);
if (!err)
MoveBlock(p, *h + len, size);
return noErr;
}

Rolf Kalbermatter
Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
Message 2 of 4
(2,698 Views)
Hello!

I see that you have already received a good answer but would like to add some information regarding this. You can read about the changes between 6.0 and 6.1 in the following two links:

Error When Calling a CIN from LabVIEW 6.0: No Prototype Exists
http://digital.ni.com/public.nsf/3efedde4322fef19862567740067f3cc/3a0ab1d4b1a3c2d1862569af00699922?OpenDocument

Why Can't I Use the CIN Example that Shows How to Handle Clusters in the Using External Code in LabVIEW manual?
http://digital.ni.com/public.nsf/websearch/BBBCF3FFF0158DA186256AC7007BC782?OpenDocument

Regards,
Jimmie A.
Applications Engineer
National Instruments
Regards,
Jimmie Adolph
Systems Engineering Manager, National Instruments Northern European Region

0 Kudos
Message 3 of 4
(2,698 Views)
RolfK wrote:

Just one correction:

> MgErr DSPtrAndHand(UPtr p, UHandle h, int32 size)
> {
> MgErr err;
> int32 len;
>
> if (!h || !*h || !p || !size)
> return mgArgErr;
>
> len = DSGetHandleSize(h);
> err = DSSetHandleSize(h, size + len);
> if (!err)
> MoveBlock(p, *h + len, size);

Replace this line

> return noErr;

with

return err;

> }

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