How to access the Shared Memory File in VMSpc. Shared Memory is a very simple method of interprocess communication. It does not require ActiveX or any other object model. It is language-independent, and used just the simplest of Windows API calls. Our example code is all Visual C++. The code has no error detection or recovery - it is extremely raw. Step 1: Define the Structure Insert the following code in your header file: struct SharedMemoryStruct { unsigned char data [4][256][30] ; // [source][pid] unsigned long msgcount [4][256] ; // [source][pid] float value [4][256] ; // [source][pid] }; "data" is the raw data, without any interpretation. Most data items are just a few bytes and are parsed into a float value. But a few items are best handled "raw", such as the Engine ID. "msgcount" is the number of times that data item has been received. "value" is the parsed value. It is already scaled, but no corrections have been applied. The initial subscript indicates the source of the data. You may wish to define the following: #define SRC_ENGINE 0 #define SRC_TRANS 1 #define SRC_ABS 2 #define SRC_EXT 3 The second subscript is the PID. For a full list of PIDs, you can spend $$$ at the SAE Bookstore. But for the PIDs you actually care about, you can run the PID Sniffer, which identifies the PIDs that actually are supported by your engine. The SRC_EXT is used for PIDs greater than 255. These are accessed as value[SRC_EXT][pid-256]. Note that occasionally the same datum may be available from different sources - e.g. Speed is available both from the engine and the ABS. Now for the actual code. You need to define two variables - a file handle and a pointer. SharedMemoryStruct * sdata; HANDLE smhandle; Then you initialize them as follows: smhandle = OpenFileMapping(FILE_MAP_READ,FALSE,"VMSpcSharedMemory"); sdata = (SharedMemoryStruct *)MapViewOfFile(smhandle,FILE_MAP_READ, 0,0,sizeof(SharedMemoryStruct)); From then on, you can access the data at any time, just like this: roadspeed = sdata->value[SRC_ENGINE][84]; That's it. You have full access to all your vehicle data. Bon Appetit!