12-07-2007 03:45 PM
12-10-2007 09:42 AM
Steve,
I'm assuming you're using a TestStand activeX checkbox. If so, you can use GetObjHandleFromActiveXCtrl to get a handle to it and then use TSUI_CheckBoxGetChecked to get its value. If you're using a Microsoft control, then you can use MSForms_IMdcCheckBoxGetValue and then use CA_VariantGetBool to retrieve the value.
12-11-2007 07:20 AM
12-11-2007 08:29 AM
12-17-2007 11:37 AM
12-17-2007 12:22 PM - edited 12-17-2007 12:28 PM
12-17-2007 02:32 PM
12-20-2007 01:23 AM
12-20-2007 01:10 PM
12-21-2007 01:17 AM - edited 12-21-2007 01:20 AM
Hi Steve,
Here are some codesnippets how to do share named Memory in C++ using SDK (Copied from serval files not tested !)
1.) create Memory, in my case placed in Operator interface
Note: NOT synronized and NO ErrorManagement and "Pointer-Freeing"
HANDLE m_hFileMapping; // memory mapped file
LPVOID m_pViewOfFile; // view of file, contains text in edit box
DWORD dwMemoryFileSize = 64;// number of characters in memory-mapped file
LPCTSTR sMemoryFileName = _T("MY_NAMED_VARIABLE"); // memory-mapped file name Hint: Best is to use a UUID here !!!
// Create file mapping which can contain dwMemoryFileSize characters
m_hFileMapping = CreateFileMapping(
INVALID_HANDLE_VALUE, // system paging file
NULL, // security attributes
PAGE_READWRITE, // protection
0, // high-order DWORD of size
dwMemoryFileSize*sizeof(TCHAR), // low-order DWORD of size
sMemoryFileName); // name
m_pViewOfFile = MapViewOfFile(
m_hFileMapping, // handle to file-mapping object
FILE_MAP_ALL_ACCESS, // desired access
0,
0,
0); // map all file
char lpcstrName[11];
strcpy(lpcstrName,"Hallo Welt");
memcpy(m_pViewOfFile, lpcstrName ,11); // write Data to memory-mapped file
2. Consuming the Named Memory , my in your Step DLL
HANDLE m_hFileMapping; // memory mapped file
LPVOID m_pViewOfFile; // view of file, contains text in edit box
DWORD dwMemoryFileSize = 64;// number of characters in memory-mapped file
LPCTSTR sMemoryFileName = _T("MY_NAMED_VARIABLE"); // memory-mapped file name Hint: Best is to use a UUID here !!!
m_hFileMapping = OpenFileMapping(FILE_MAP_ALL_ACCESS,
FALSE,
sMemoryFileName);
m_pViewOfFile = MapViewOfFile(m_hFileMapping, // Handle to mapping object.
FILE_MAP_ALL_ACCESS, // Read/write permission.
0, // Max. object size.
0, // Size of hFile.
0); // Map entire file.
// Consuming the Memory
char lpcstrName[11];
memcpy(lpcstrName,m_pViewOfFile, 11);
Hope this help greetings
Juergen