LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

niimaq.h function arguement discreptancies

Hi,

I am writing a partial python wrapper for NI IMAQ to capture images form a camera and either save them or display a video in real time.

My issue is that the documentation is inconsistent, for example, in niimaq.h that comes installed:

USER_FUNC imgSessionSaveBufferEx(SESSION_ID sid, void *buffer,Int8* file_name);

 It seems the filename is passed to the function as an integer pointer - which to me doesn't make much sense.

When I look at this support site: http://zone.ni.com/reference/en-XX/help/370161G-01/imaqfr/imgsessionsavebufferex/

It has a char pointer for the filename (which makes more sense).

rval imgSessionSaveBufferEx(SESSION_ID sid, const void* buffer, const char* fileName);

 

I decided to pass a char pointer to see what would happen, but it tells me that it's of the wrong type (which would make sense, as it's going by niimaq.h)

 

I've been using the support site and niimaq.h to piece together a wrapper, but it's beginning to feel futile. Any ideas or suggestions? 

 

Thank you!

0 Kudos
Message 1 of 3
(3,060 Views)

Hi Enginour,

 

Out of curiosity, if you use an integer pointer, what happens?

 

Thanks,

 

Peter George

Applications Engineer

National Instruments

0 Kudos
Message 2 of 3
(2,977 Views)

Hi Peter,

I gave up and switched to LabVIEW, where things have been exponentially faster. I plan to use the python/labview integration toolkit from here on out, and would strongly recommend it to others, labview just makes life a lot easier in terms of interfacing with hardware. I will say I have used NI-DAQmx and the API provided by NI for python, and that was really good. Perhaps one day there will be a similar API for NI IMAQ to avoid using c-types manually.

0 Kudos
Message 3 of 3
(2,952 Views)