File tree Expand file tree Collapse file tree
cpp/ql/test/library-tests/dataflow/source-sink-tests Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -135,3 +135,47 @@ void test_CAtlFile() {
135135 char buffer[1024 ];
136136 catFile.Read (buffer, 1024 ); // $ local_source
137137}
138+
139+ struct CAtlFileMappingBase {
140+ CAtlFileMappingBase (CAtlFileMappingBase& orig);
141+ CAtlFileMappingBase () throw ();
142+ ~CAtlFileMappingBase () throw ();
143+
144+ HRESULT CopyFrom (CAtlFileMappingBase& orig) throw();
145+ void * GetData () const throw();
146+ HANDLE GetHandle () throw ();
147+ SIZE_T GetMappingSize () throw();
148+
149+ HRESULT MapFile (
150+ HANDLE hFile,
151+ SIZE_T nMappingSize,
152+ ULONGLONG nOffset,
153+ DWORD dwMappingProtection,
154+ DWORD dwViewDesiredAccess) throw();
155+
156+ HRESULT MapSharedMem (
157+ SIZE_T nMappingSize,
158+ LPCTSTR szName,
159+ BOOL* pbAlreadyExisted,
160+ LPSECURITY_ATTRIBUTES lpsa,
161+ DWORD dwMappingProtection,
162+ DWORD dwViewDesiredAccess) throw();
163+
164+ HRESULT OpenMapping (
165+ LPCTSTR szName,
166+ SIZE_T nMappingSize,
167+ ULONGLONG nOffset,
168+ DWORD dwViewDesiredAccess) throw();
169+
170+ HRESULT Unmap () throw();
171+ };
172+
173+ template <typename T>
174+ struct CAtlFileMapping : public CAtlFileMappingBase {
175+ operator T*() const throw ();
176+ };
177+
178+ void test_CAtlFileMapping (CAtlFileMapping<char > mapping) {
179+ char * data = static_cast <char *>(mapping); // $ MISSING: local_source
180+ void * data2 = mapping.GetData (); // $ MISSING: local_source
181+ }
You can’t perform that action at this time.
0 commit comments