--1813850.1078843123492.JavaMail.quiq.tekken
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
I am having trouble trying to do this also. I have a c++ program that
is creating and writing to a shared memory location. I know that it
is working correctly becuase i read off that memory with several other
apps. I tried writing a dll with the same read code, but Labview
Crashes Everytime I run it.
Attached is a simple dll example i tried to trys to read one element
out of and array.(The arrays has 40 elements.) Anyone have any
suggestions? (This is just the read mind you.)
--1813850.1078843123492.JavaMail.quiq.tekken
Content-Type: text/plain; name=sharedmemopen.txt
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename=sharedmemopen.txt
Content-Description: dll code for labview
#incl/* Call Library source file */
#include "extcode.h"
#include "cvilvsb.h"
#include "fundtypes.h"
#include "hosttype.h"
#include "platdefines.h"
#include <windows.h>
#include <fcntl.h>
#include <sys/types.h>
#include <stdio.h>
#include <process.h>
#include <memory.h>
extern "C"{
_declspec(dllexport) void SharedMemoryInit(float *x1);}
_declspec(dllexport) void SharedMemoryInit(float *x1)
{
HANDLE hMapObject;
float *MapView;
//share memory file init
hMapObject=OpenFileMapping(FILE_MAP_ALL_ACCESS,FALSE,"rstk_shared_memory");
MapView=(float*)MapViewOfFileEx(hMapObject,FILE_MAP_ALL_ACCESS,0,0,0,0);
*x1=MapView[3];
}
--1813850.1078843123492.JavaMail.quiq.tekken--