Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

LVRefNum in a CIN file descriptor difficulties

I am currently developing an application that uses labview and IMAQ to acquire images from a 1429 cameralink capture card.
We aim to analyse the images using some previously devoped c code. Our complications come when trying to access the images
from within a c interface node, where we are having difficulty in obtaining the file descriptors for each image.


typedef struct {
 int32 dimSize;
 LVRefNum ImageOut[1];
 } TD1;
typedef TD1 **TD1Hdl;

MgErr CINRun(TD1Hdl ImagesOut, uInt32 *ROIWidth, uInt32 *ROIHeight,
 TD2Hdl arg1, TD3Hdl arg2)
 {
  
  File fd;
  LVRefNum *thisrefnum;
  uInt8 *target;
  int32 numread;
  int32 frames;
  MgErr test;

  frames=(*ImagesOut)->dimSize;
  thisrefnum=(*ImagesOut)->ImageOut;
  test=FRefNumToFD(thisrefnum[0], &fd);
  if(test==mgArgErr)DbgPrintf("mgArgErr");
}
   
An error is reported by FRefNumToFD ie i don't pass a valid refnum. Does anyone have any ideas what I done wrong?

Any suggestions much appreciated.

Ben

0 Kudos
Message 1 of 2
(3,090 Views)

Hi,

  you posted this on the LabVIEW forum - I'm pointing this thread to that one so we can answer this in one place.

Thanks

http://forums.ni.com/ni/board/message?board.id=170&message.id=150718

Sacha Emery
National Instruments (UK)

// it takes almost no time to rate an answer Smiley Wink
0 Kudos
Message 2 of 2
(3,082 Views)