01-17-2008 12:10 PM
Hi intvsteve,
Here is the function from the dll:
__declspec(dllexport)
void npm_bb_read_register(unsigned char *bL, unsigned char *bH, unsigned int len, unsigned int adr)
{
unsigned char b[4] ;//= bL + *bH * 0xffff;
//DWORD start;
EnterCriticalSection(&cs);
if (((len == 1) || (len == 4)) && (b != NULL) && already_init) {
//nm_read_reg(adr, b, len);
dbg(_ERR_, "..(%d)\n", (int)GetTickCount());
pbus->nmi_bus_read((void *)&bustype, adr, (unsigned char *)b, len);
dbg(_ERR_, "..(%d)\n", (int)GetTickCount());
dbg(_ERR_, "read reg: (%d)(%08x)(%08x)\n", len, adr, *((DWORD*)b));
}
*bL = b[0];
*(bL+1)= b[1];
*(bH) = b[2];
*(bH+1)= b[3];
LeaveCriticalSection(&cs);
}
01-17-2008 12:22 PM
Hi Intvsteve,
Sorry, I had given wrong function header. But to me it makes no sense how come there is an error on the dll. The only thing I could think of, is that the NM312DLL is calling other dlls internally. I don't think that should cause a problem for LabVIEW it should be ok right?
Thanks,
Safe
01-17-2008 12:50 PM
01-17-2008 12:58 PM
02-04-2008 04:27 PM
Hi Intvsteve,
I have proven that function paramater naming is not a problem. I have another DLL that works with 1 unsigned integer pointer, rather than the char pointer. unfortunatly i still get 1097 error. Here are the two functions:
What do you suggest is the problem? I did tried both threads, but i don't know anything about the memory overwritten, or how I can stop that problem.
Thanx,
Saif
02-06-2008 09:08 PM