Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

what causes the NI-DAQ memPageLockError (code -10447) ?

Howdy,
before i go into the question, i would like specify that i am using NI-DAQ and VC++ and not measurement studio. i didn't find any other forum specifically related to that and figured that the members of this forum would be best suited to handle this question. i would really appreciate it if anybody can help me out with this.

i am using NI-DAQ to perform double buffered data acquisition. i tried creating the buffer dynamically by using new, GlobalAlloc (Win API) and MapViewOfFile (WinAPI) inside a class. i created a worker thread that takes a pointer to an object of this class as an argument. the worker thread calls SCAN_Start and passes the pointer to the buffer as one of the arguments. SCAN_Start fails to execute and puts out memPageLockError.

i was wondering what causes this error to occur? when i don't use threading and classes but just use dynamic allocation everything works fine.

thanks for reading.

vik
0 Kudos
Message 1 of 5
(3,512 Views)
Hello Vik,

Thank you for contacting National Instruments.

Are you using Traditional NI-DAQ or DAQmx? The reason I ask is that Traditional NI-DAQ does not support multithreading and might cause that error.

Sean C.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 5
(3,501 Views)
i am using traditional DAQ. i guess that must be causing the trouble.

i use a PCI 6052E multifunction board. can i use NI-DAQmx with that? are there any restrictions? is there a loss of functionality when using NI-DAQmx?

thanks for your help,

vik
0 Kudos
Message 3 of 5
(3,498 Views)
Hi Vik,

The PCI-6052E is supported in NI-DAQmx. There should be no restrictions or drawbacks to making this switch (DAQmx is our next generation driver). Please keep in mind that with a new DAQ driver come a new set of DAQmx C functions. You can find information about these functions by going to Start >> All Programs >> National Instruments >> NI-DAQ >> NI-DAQmx C Reference Help.

Let me know if you have any further questions.

Sean C.
0 Kudos
Message 4 of 5
(3,480 Views)
Sean,

thank you for helping me.
i will install the new set of drivers.
thanks again,
vik
0 Kudos
Message 5 of 5
(3,467 Views)