1// Licensed to the .NET Foundation under one or more agreements.
2// The .NET Foundation licenses this file to you under the MIT license.
3// See the LICENSE file in the project root for more information.
4
5
6// callbacks for diasymreader when using SymConverter
7
8
9#include "stdafx.h"
10#include "symbolinfo.h"
11#include "ex.h"
12
13
14SymbolInfo::SymbolInfo()
15{
16 m_cRef=1;
17}
18
19SymbolInfo::~SymbolInfo()
20{
21 for (COUNT_T i = 0;i < m_Documents.GetCount();i++)
22 {
23 if (m_Documents.Get(i) != NULL)
24 ((ISymUnmanagedDocumentWriter*)m_Documents.Get(i))->Release();
25 }
26}
27
28HRESULT SymbolInfo::AddDocument(DWORD id, ISymUnmanagedDocumentWriter* pDocument)
29{
30 CONTRACTL
31 {
32 NOTHROW;
33 }
34 CONTRACTL_END;
35
36 HRESULT hr=S_OK;
37 EX_TRY
38 {
39 while(m_Documents.GetCount()<=id)
40 m_Documents.Append(NULL);
41 _ASSERTE(m_Documents.Get(id) == NULL);
42 m_Documents.Set(id,pDocument);
43 pDocument->AddRef();
44 }
45 EX_CATCH_HRESULT(hr);
46 return hr;
47}
48
49HRESULT SymbolInfo::MapDocument(DWORD id, ISymUnmanagedDocumentWriter** pDocument)
50{
51 CONTRACTL
52 {
53 NOTHROW;
54 }
55 CONTRACTL_END;
56
57 HRESULT hr=E_FAIL;
58 if(m_Documents.GetCount()>id)
59 {
60 *pDocument=(ISymUnmanagedDocumentWriter*)m_Documents.Get(id);
61 if (*pDocument == NULL)
62 return E_FAIL;
63 (*pDocument)->AddRef();
64 hr=S_OK;
65 }
66 return hr;
67}
68
69HRESULT SymbolInfo::SetClassProps(mdToken cls, DWORD flags, LPCWSTR wszName, mdToken parent)
70{
71 CONTRACTL
72 {
73 NOTHROW;
74 }
75 CONTRACTL_END;
76
77 HRESULT hr=S_OK;
78 EX_TRY
79 {
80 if(m_Classes.Lookup(cls) == NULL)
81 {
82 NewHolder<ClassProps> classProps (new ClassProps(cls,flags,wszName,parent));
83 m_Classes.Add(classProps);
84 classProps.SuppressRelease();
85 }
86 }
87 EX_CATCH_HRESULT(hr);
88 return hr;
89}
90
91HRESULT SymbolInfo::AddSignature(SBuffer& sig, mdSignature token)
92{
93 CONTRACTL
94 {
95 NOTHROW;
96 }
97 CONTRACTL_END;
98
99 HRESULT hr=S_OK;
100 EX_TRY
101 {
102 if ( m_Signatures.Lookup(sig) == NULL)
103 {
104 NewHolder<SignatureProps> sigProps (new SignatureProps(sig,token));
105 m_Signatures.Add(sigProps);
106 sigProps.SuppressRelease();
107 }
108 }
109 EX_CATCH_HRESULT(hr);
110 return hr;
111}
112
113
114SymbolInfo::ClassProps* SymbolInfo::FindClass(mdToken cls)
115{
116 WRAPPER_NO_CONTRACT;
117 return m_Classes.Lookup(cls);
118}
119
120SymbolInfo::SignatureProps* SymbolInfo::FindSignature(SBuffer& sig)
121{
122 WRAPPER_NO_CONTRACT;
123 return m_Signatures.Lookup(sig);
124}
125
126HRESULT SymbolInfo::AddScope(ULONG32 left, ULONG32 right)
127{
128 CONTRACTL
129 {
130 NOTHROW;
131 }
132 CONTRACTL_END;
133
134 HRESULT hr=S_OK;
135 EX_TRY
136 {
137 if (m_Scopes.Lookup(left) == NULL)
138 {
139 NewHolder<ScopeMap> map (new ScopeMap(left,right));
140 m_Scopes.Add(map);
141 map.SuppressRelease();
142 }
143 }
144 EX_CATCH_HRESULT(hr);
145 return hr;
146
147}
148
149HRESULT SymbolInfo::MapScope(ULONG32 left, ULONG32* pRight)
150{
151 CONTRACTL
152 {
153 NOTHROW;
154 }
155 CONTRACTL_END;
156
157 ScopeMap* props = m_Scopes.Lookup(left);
158 if(props == NULL)
159 {
160 _ASSERTE(FALSE);
161 return E_FAIL;
162 }
163 *pRight=props->right;
164 return S_OK;
165}
166
167
168
169HRESULT SymbolInfo::SetMethodProps(mdToken method, mdToken cls, LPCWSTR wszName)
170{
171 CONTRACTL
172 {
173 NOTHROW;
174 }
175 CONTRACTL_END;
176
177 HRESULT hr=S_OK;
178 EX_TRY
179 {
180 m_LastMethod.method=method;
181 m_LastMethod.cls=cls;
182 m_LastMethod.wszName=wszName;
183 m_LastMethod.wszName.Normalize();
184 }
185 EX_CATCH_HRESULT(hr)
186 return hr;
187}
188
189
190// IUnknown methods
191STDMETHODIMP SymbolInfo::QueryInterface (REFIID riid, LPVOID * ppvObj)
192{
193 CONTRACTL
194 {
195 NOTHROW;
196 }
197 CONTRACTL_END;
198
199 if(ppvObj==NULL)
200 return E_POINTER;
201
202 if (riid == IID_IMetaDataEmit)
203 *ppvObj=static_cast<IMetaDataEmit*>(this);
204 else
205 if (riid == IID_IMetaDataImport)
206 *ppvObj=static_cast<IMetaDataImport*>(this);
207 else
208 if (riid == IID_IUnknown)
209 *ppvObj=static_cast<IMetaDataImport*>(this);
210 else
211 return E_NOTIMPL;
212
213 AddRef();
214 return S_OK;
215}
216
217STDMETHODIMP_(ULONG) SymbolInfo::AddRef ()
218{
219 LIMITED_METHOD_CONTRACT;
220 return InterlockedIncrement(&m_cRef);
221}
222
223STDMETHODIMP_(ULONG) SymbolInfo::Release ()
224{
225 LIMITED_METHOD_CONTRACT;
226 ULONG retval=InterlockedDecrement(&m_cRef);
227 if(retval==0)
228 delete this;
229
230 return retval;
231}
232
233STDMETHODIMP SymbolInfo::GetTypeDefProps ( // S_OK or error.
234 mdTypeDef td, // [IN] TypeDef token for inquiry.
235 __out_ecount_part_opt(cchTypeDef, pchTypeDef)
236 LPWSTR szTypeDef, // [OUT] Put name here.
237 ULONG cchTypeDef, // [IN] size of name buffer in wide chars.
238 ULONG *pchTypeDef, // [OUT] put size of name (wide chars) here.
239 DWORD *pdwTypeDefFlags, // [OUT] Put flags here.
240 mdToken *ptkExtends) // [OUT] Put base class TypeDef/TypeRef here.
241{
242 CONTRACTL
243 {
244 NOTHROW;
245 PRECONDITION(ptkExtends==NULL);
246 PRECONDITION(CheckPointer(szTypeDef));
247 }
248 CONTRACTL_END;
249
250 if (szTypeDef == NULL)
251 return E_POINTER;
252
253 ClassProps* classInfo=FindClass(td);
254 _ASSERTE(classInfo);
255 if(classInfo == NULL)
256 return E_UNEXPECTED;
257
258 if(pdwTypeDefFlags)
259 *pdwTypeDefFlags=classInfo->flags;
260
261
262 SIZE_T cch=wcslen(classInfo->wszName)+1;
263 if (cch > ULONG_MAX)
264 return E_UNEXPECTED;
265 *pchTypeDef=(ULONG)cch;
266
267 if (cchTypeDef < cch)
268 return HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER);
269
270 wcscpy_s(szTypeDef,cchTypeDef,classInfo->wszName);
271
272 if(pdwTypeDefFlags)
273 *pdwTypeDefFlags=classInfo->flags;
274
275
276 return S_OK;
277}
278
279STDMETHODIMP SymbolInfo::GetMethodProps (
280 mdMethodDef mb, // The method for which to get props.
281 mdTypeDef *pClass, // Put method's class here.
282 __out_ecount_part_opt(cchMethod, *pchMethod)
283 LPWSTR szMethod, // Put method's name here.
284 ULONG cchMethod, // Size of szMethod buffer in wide chars.
285 ULONG *pchMethod, // Put actual size here
286 DWORD *pdwAttr, // Put flags here.
287 PCCOR_SIGNATURE *ppvSigBlob, // [OUT] point to the blob value of meta data
288 ULONG *pcbSigBlob, // [OUT] actual size of signature blob
289 ULONG *pulCodeRVA, // [OUT] codeRVA
290 DWORD *pdwImplFlags) // [OUT] Impl. Flags
291{
292 CONTRACTL
293 {
294 NOTHROW;
295 PRECONDITION(m_LastMethod.method==mb);
296 PRECONDITION(pClass!=NULL);
297 PRECONDITION(pchMethod!=NULL);
298
299 PRECONDITION(pdwAttr == NULL);
300 PRECONDITION(ppvSigBlob == NULL);
301 PRECONDITION(pcbSigBlob == NULL);
302 PRECONDITION(pulCodeRVA == NULL);
303 PRECONDITION(pdwImplFlags == NULL);
304 PRECONDITION(CheckPointer(szMethod));
305 }
306 CONTRACTL_END;
307
308 if (szMethod == NULL)
309 return E_POINTER;
310
311
312 *pClass=m_LastMethod.cls;
313 SIZE_T cch=wcslen(m_LastMethod.wszName)+1;
314 if(cch > ULONG_MAX)
315 return E_UNEXPECTED;
316 *pchMethod=(ULONG)cch;
317
318 if (cchMethod < cch)
319 return HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER);
320
321 wcscpy_s(szMethod,cchMethod,m_LastMethod.wszName);
322
323 return S_OK;
324}
325
326
327STDMETHODIMP SymbolInfo::GetNestedClassProps ( // S_OK or error.
328 mdTypeDef tdNestedClass, // [IN] NestedClass token.
329 mdTypeDef *ptdEnclosingClass) // [OUT] EnclosingClass token.
330{
331 CONTRACTL
332 {
333 NOTHROW;
334 PRECONDITION(CheckPointer(ptdEnclosingClass));
335 }
336 CONTRACTL_END;
337
338 if(ptdEnclosingClass == NULL)
339 return E_POINTER;
340
341 ClassProps* classInfo=FindClass(tdNestedClass);
342 _ASSERTE(classInfo);
343 if(classInfo == NULL)
344 return E_UNEXPECTED;
345
346 *ptdEnclosingClass=classInfo->tkEnclosing;
347
348
349 return S_OK;
350
351}
352
353
354STDMETHODIMP SymbolInfo::GetTokenFromSig ( // S_OK or error.
355 PCCOR_SIGNATURE pvSig, // [IN] Signature to define.
356 ULONG cbSig, // [IN] Size of signature data.
357 mdSignature *pmsig) // [OUT] returned signature token.
358{
359 SBuffer sig;
360 sig.SetImmutable(pvSig,cbSig);
361 SignatureProps* sigProps=FindSignature(sig);
362 _ASSERTE(sigProps);
363 if(sigProps == NULL)
364 return E_UNEXPECTED;
365
366 *pmsig=sigProps->tkSig;
367 return S_OK;
368}
369
370
371//////////////////////////////////////////////
372// All the functions below are just stubs
373
374STDMETHODIMP_(void) SymbolInfo::CloseEnum (HCORENUM hEnum)
375{
376 _ASSERTE(!"NYI");
377}
378
379STDMETHODIMP SymbolInfo::CountEnum (HCORENUM hEnum, ULONG *pulCount)
380{
381 _ASSERTE(!"NYI");
382 return E_NOTIMPL;
383}
384
385STDMETHODIMP SymbolInfo::ResetEnum (HCORENUM hEnum, ULONG ulPos)
386{
387 _ASSERTE(!"NYI");
388 return E_NOTIMPL;
389}
390
391STDMETHODIMP SymbolInfo::EnumTypeDefs (HCORENUM *phEnum, mdTypeDef rTypeDefs[],
392 ULONG cMax, ULONG *pcTypeDefs)
393{
394 _ASSERTE(!"NYI");
395 return E_NOTIMPL;
396}
397
398STDMETHODIMP SymbolInfo::EnumInterfaceImpls (HCORENUM *phEnum, mdTypeDef td,
399 mdInterfaceImpl rImpls[], ULONG cMax,
400 ULONG* pcImpls)
401{
402 _ASSERTE(!"NYI");
403 return E_NOTIMPL;
404}
405
406STDMETHODIMP SymbolInfo::EnumTypeRefs (HCORENUM *phEnum, mdTypeRef rTypeRefs[],
407 ULONG cMax, ULONG* pcTypeRefs)
408{
409 _ASSERTE(!"NYI");
410 return E_NOTIMPL;
411}
412
413STDMETHODIMP SymbolInfo::FindTypeDefByName ( // S_OK or error.
414 LPCWSTR szTypeDef, // [IN] Name of the Type.
415 mdToken tkEnclosingClass, // [IN] TypeDef/TypeRef for Enclosing class.
416 mdTypeDef *ptd) // [OUT] Put the TypeDef token here.
417{
418 _ASSERTE(!"NYI");
419 return E_NOTIMPL;
420}
421
422STDMETHODIMP SymbolInfo::GetScopeProps ( // S_OK or error.
423 __out_ecount_part_opt(cchName, *pchName)
424 LPWSTR szName, // [OUT] Put the name here.
425 ULONG cchName, // [IN] Size of name buffer in wide chars.
426 ULONG *pchName, // [OUT] Put size of name (wide chars) here.
427 GUID *pmvid) // [OUT, OPTIONAL] Put MVID here.
428{
429 _ASSERTE(!"NYI");
430 return E_NOTIMPL;
431}
432
433STDMETHODIMP SymbolInfo::GetModuleFromScope ( // S_OK.
434 mdModule *pmd) // [OUT] Put mdModule token here.
435{
436 _ASSERTE(!"NYI");
437 return E_NOTIMPL;
438}
439
440
441STDMETHODIMP SymbolInfo::GetInterfaceImplProps ( // S_OK or error.
442 mdInterfaceImpl iiImpl, // [IN] InterfaceImpl token.
443 mdTypeDef *pClass, // [OUT] Put implementing class token here.
444 mdToken *ptkIface) // [OUT] Put implemented interface token here.
445{
446 _ASSERTE(!"NYI");
447 return E_NOTIMPL;
448}
449
450STDMETHODIMP SymbolInfo::GetTypeRefProps ( // S_OK or error.
451 mdTypeRef tr, // [IN] TypeRef token.
452 mdToken *ptkResolutionScope, // [OUT] Resolution scope, ModuleRef or AssemblyRef.
453 __out_ecount_part_opt(cchName, *pchName)
454 LPWSTR szName, // [OUT] Name of the TypeRef.
455 ULONG cchName, // [IN] Size of buffer.
456 ULONG *pchName) // [OUT] Size of Name.
457{
458 _ASSERTE(!"NYI");
459 return E_NOTIMPL;
460}
461
462STDMETHODIMP SymbolInfo::ResolveTypeRef (mdTypeRef tr, REFIID riid, IUnknown **ppIScope, mdTypeDef *ptd)
463{
464 _ASSERTE(!"NYI");
465 return E_NOTIMPL;
466}
467
468
469STDMETHODIMP SymbolInfo::EnumMembers ( // S_OK, S_FALSE, or error.
470 HCORENUM *phEnum, // [IN|OUT] Pointer to the enum.
471 mdTypeDef cl, // [IN] TypeDef to scope the enumeration.
472 mdToken rMembers[], // [OUT] Put MemberDefs here.
473 ULONG cMax, // [IN] Max MemberDefs to put.
474 ULONG *pcTokens) // [OUT] Put # put here.
475{
476 _ASSERTE(!"NYI");
477 return E_NOTIMPL;
478}
479
480STDMETHODIMP SymbolInfo::EnumMembersWithName ( // S_OK, S_FALSE, or error.
481 HCORENUM *phEnum, // [IN|OUT] Pointer to the enum.
482 mdTypeDef cl, // [IN] TypeDef to scope the enumeration.
483 LPCWSTR szName, // [IN] Limit results to those with this name.
484 mdToken rMembers[], // [OUT] Put MemberDefs here.
485 ULONG cMax, // [IN] Max MemberDefs to put.
486 ULONG *pcTokens) // [OUT] Put # put here.
487{
488 _ASSERTE(!"NYI");
489 return E_NOTIMPL;
490}
491
492STDMETHODIMP SymbolInfo::EnumMethods ( // S_OK, S_FALSE, or error.
493 HCORENUM *phEnum, // [IN|OUT] Pointer to the enum.
494 mdTypeDef cl, // [IN] TypeDef to scope the enumeration.
495 mdMethodDef rMethods[], // [OUT] Put MethodDefs here.
496 ULONG cMax, // [IN] Max MethodDefs to put.
497 ULONG *pcTokens) // [OUT] Put # put here.
498{
499 _ASSERTE(!"NYI");
500 return E_NOTIMPL;
501}
502
503STDMETHODIMP SymbolInfo::EnumMethodsWithName ( // S_OK, S_FALSE, or error.
504 HCORENUM *phEnum, // [IN|OUT] Pointer to the enum.
505 mdTypeDef cl, // [IN] TypeDef to scope the enumeration.
506 LPCWSTR szName, // [IN] Limit results to those with this name.
507 mdMethodDef rMethods[], // [OU] Put MethodDefs here.
508 ULONG cMax, // [IN] Max MethodDefs to put.
509 ULONG *pcTokens) // [OUT] Put # put here.
510{
511 _ASSERTE(!"NYI");
512 return E_NOTIMPL;
513}
514
515STDMETHODIMP SymbolInfo::EnumFields ( // S_OK, S_FALSE, or error.
516 HCORENUM *phEnum, // [IN|OUT] Pointer to the enum.
517 mdTypeDef cl, // [IN] TypeDef to scope the enumeration.
518 mdFieldDef rFields[], // [OUT] Put FieldDefs here.
519 ULONG cMax, // [IN] Max FieldDefs to put.
520 ULONG *pcTokens) // [OUT] Put # put here.
521{
522 _ASSERTE(!"NYI");
523 return E_NOTIMPL;
524}
525
526STDMETHODIMP SymbolInfo::EnumFieldsWithName ( // S_OK, S_FALSE, or error.
527 HCORENUM *phEnum, // [IN|OUT] Pointer to the enum.
528 mdTypeDef cl, // [IN] TypeDef to scope the enumeration.
529 LPCWSTR szName, // [IN] Limit results to those with this name.
530 mdFieldDef rFields[], // [OUT] Put MemberDefs here.
531 ULONG cMax, // [IN] Max MemberDefs to put.
532 ULONG *pcTokens) // [OUT] Put # put here.
533{
534 _ASSERTE(!"NYI");
535 return E_NOTIMPL;
536}
537
538
539STDMETHODIMP SymbolInfo::EnumParams ( // S_OK, S_FALSE, or error.
540 HCORENUM *phEnum, // [IN|OUT] Pointer to the enum.
541 mdMethodDef mb, // [IN] MethodDef to scope the enumeration.
542 mdParamDef rParams[], // [OUT] Put ParamDefs here.
543 ULONG cMax, // [IN] Max ParamDefs to put.
544 ULONG *pcTokens) // [OUT] Put # put here.
545{
546 _ASSERTE(!"NYI");
547 return E_NOTIMPL;
548}
549
550STDMETHODIMP SymbolInfo::EnumMemberRefs ( // S_OK, S_FALSE, or error.
551 HCORENUM *phEnum, // [IN|OUT] Pointer to the enum.
552 mdToken tkParent, // [IN] Parent token to scope the enumeration.
553 mdMemberRef rMemberRefs[], // [OUT] Put MemberRefs here.
554 ULONG cMax, // [IN] Max MemberRefs to put.
555 ULONG *pcTokens) // [OUT] Put # put here.
556{
557 _ASSERTE(!"NYI");
558 return E_NOTIMPL;
559}
560
561STDMETHODIMP SymbolInfo::EnumMethodImpls ( // S_OK, S_FALSE, or error
562 HCORENUM *phEnum, // [IN|OUT] Pointer to the enum.
563 mdTypeDef td, // [IN] TypeDef to scope the enumeration.
564 mdToken rMethodBody[], // [OUT] Put Method Body tokens here.
565 mdToken rMethodDecl[], // [OUT] Put Method Declaration tokens here.
566 ULONG cMax, // [IN] Max tokens to put.
567 ULONG *pcTokens) // [OUT] Put # put here.
568{
569 _ASSERTE(!"NYI");
570 return E_NOTIMPL;
571}
572
573STDMETHODIMP SymbolInfo::EnumPermissionSets ( // S_OK, S_FALSE, or error.
574 HCORENUM *phEnum, // [IN|OUT] Pointer to the enum.
575 mdToken tk, // [IN] if !NIL, token to scope the enumeration.
576 DWORD dwActions, // [IN] if !0, return only these actions.
577 mdPermission rPermission[], // [OUT] Put Permissions here.
578 ULONG cMax, // [IN] Max Permissions to put.
579 ULONG *pcTokens) // [OUT] Put # put here.
580{
581 _ASSERTE(!"NYI");
582 return E_NOTIMPL;
583}
584
585STDMETHODIMP SymbolInfo::FindMember (
586 mdTypeDef td, // [IN] given typedef
587 LPCWSTR szName, // [IN] member name
588 PCCOR_SIGNATURE pvSigBlob, // [IN] point to a blob value of CLR signature
589 ULONG cbSigBlob, // [IN] count of bytes in the signature blob
590 mdToken *pmb) // [OUT] matching memberdef
591{
592 _ASSERTE(!"NYI");
593 return E_NOTIMPL;
594}
595
596STDMETHODIMP SymbolInfo::FindMethod (
597 mdTypeDef td, // [IN] given typedef
598 LPCWSTR szName, // [IN] member name
599 PCCOR_SIGNATURE pvSigBlob, // [IN] point to a blob value of CLR signature
600 ULONG cbSigBlob, // [IN] count of bytes in the signature blob
601 mdMethodDef *pmb) // [OUT] matching memberdef
602{
603 _ASSERTE(!"NYI");
604 return E_NOTIMPL;
605}
606
607STDMETHODIMP SymbolInfo::FindField (
608 mdTypeDef td, // [IN] given typedef
609 LPCWSTR szName, // [IN] member name
610 PCCOR_SIGNATURE pvSigBlob, // [IN] point to a blob value of CLR signature
611 ULONG cbSigBlob, // [IN] count of bytes in the signature blob
612 mdFieldDef *pmb) // [OUT] matching memberdef
613{
614 _ASSERTE(!"NYI");
615 return E_NOTIMPL;
616}
617
618STDMETHODIMP SymbolInfo::FindMemberRef (
619 mdTypeRef td, // [IN] given typeRef
620 LPCWSTR szName, // [IN] member name
621 PCCOR_SIGNATURE pvSigBlob, // [IN] point to a blob value of CLR signature
622 ULONG cbSigBlob, // [IN] count of bytes in the signature blob
623 mdMemberRef *pmr) // [OUT] matching memberref
624{
625 _ASSERTE(!"NYI");
626 return E_NOTIMPL;
627}
628
629
630STDMETHODIMP SymbolInfo::GetMemberRefProps ( // S_OK or error.
631 mdMemberRef mr, // [IN] given memberref
632 mdToken *ptk, // [OUT] Put classref or classdef here.
633 __out_ecount_part_opt(cchMember, *pchMember)
634 LPWSTR szMember, // [OUT] buffer to fill for member's name
635 ULONG cchMember, // [IN] the count of char of szMember
636 ULONG *pchMember, // [OUT] actual count of char in member name
637 PCCOR_SIGNATURE *ppvSigBlob, // [OUT] point to meta data blob value
638 ULONG *pbSig) // [OUT] actual size of signature blob
639{
640 _ASSERTE(!"NYI");
641 return E_NOTIMPL;
642}
643
644STDMETHODIMP SymbolInfo::EnumProperties ( // S_OK, S_FALSE, or error.
645 HCORENUM *phEnum, // [IN|OUT] Pointer to the enum.
646 mdTypeDef td, // [IN] TypeDef to scope the enumeration.
647 mdProperty rProperties[], // [OUT] Put Properties here.
648 ULONG cMax, // [IN] Max properties to put.
649 ULONG *pcProperties) // [OUT] Put # put here.
650{
651 _ASSERTE(!"NYI");
652 return E_NOTIMPL;
653}
654
655STDMETHODIMP SymbolInfo::EnumEvents ( // S_OK, S_FALSE, or error.
656 HCORENUM *phEnum, // [IN|OUT] Pointer to the enum.
657 mdTypeDef td, // [IN] TypeDef to scope the enumeration.
658 mdEvent rEvents[], // [OUT] Put events here.
659 ULONG cMax, // [IN] Max events to put.
660 ULONG *pcEvents) // [OUT] Put # put here.
661{
662 _ASSERTE(!"NYI");
663 return E_NOTIMPL;
664}
665
666STDMETHODIMP SymbolInfo::GetEventProps ( // S_OK, S_FALSE, or error.
667 mdEvent ev, // [IN] event token
668 mdTypeDef *pClass, // [OUT] typedef containing the event declarion.
669 LPCWSTR szEvent, // [OUT] Event name
670 ULONG cchEvent, // [IN] the count of wchar of szEvent
671 ULONG *pchEvent, // [OUT] actual count of wchar for event's name
672 DWORD *pdwEventFlags, // [OUT] Event flags.
673 mdToken *ptkEventType, // [OUT] EventType class
674 mdMethodDef *pmdAddOn, // [OUT] AddOn method of the event
675 mdMethodDef *pmdRemoveOn, // [OUT] RemoveOn method of the event
676 mdMethodDef *pmdFire, // [OUT] Fire method of the event
677 mdMethodDef rmdOtherMethod[], // [OUT] other method of the event
678 ULONG cMax, // [IN] size of rmdOtherMethod
679 ULONG *pcOtherMethod) // [OUT] total number of other method of this event
680{
681 _ASSERTE(!"NYI");
682 return E_NOTIMPL;
683}
684
685STDMETHODIMP SymbolInfo::EnumMethodSemantics ( // S_OK, S_FALSE, or error.
686 HCORENUM *phEnum, // [IN|OUT] Pointer to the enum.
687 mdMethodDef mb, // [IN] MethodDef to scope the enumeration.
688 mdToken rEventProp[], // [OUT] Put Event/Property here.
689 ULONG cMax, // [IN] Max properties to put.
690 ULONG *pcEventProp) // [OUT] Put # put here.
691{
692 _ASSERTE(!"NYI");
693 return E_NOTIMPL;
694}
695
696STDMETHODIMP SymbolInfo::GetMethodSemantics ( // S_OK, S_FALSE, or error.
697 mdMethodDef mb, // [IN] method token
698 mdToken tkEventProp, // [IN] event/property token.
699 DWORD *pdwSemanticsFlags) // [OUT] the role flags for the method/propevent pair
700{
701 _ASSERTE(!"NYI");
702 return E_NOTIMPL;
703}
704
705STDMETHODIMP SymbolInfo::GetClassLayout (
706 mdTypeDef td, // [IN] give typedef
707 DWORD *pdwPackSize, // [OUT] 1, 2, 4, 8, or 16
708 COR_FIELD_OFFSET rFieldOffset[], // [OUT] field offset array
709 ULONG cMax, // [IN] size of the array
710 ULONG *pcFieldOffset, // [OUT] needed array size
711 ULONG *pulClassSize) // [OUT] the size of the class
712{
713 _ASSERTE(!"NYI");
714 return E_NOTIMPL;
715}
716
717STDMETHODIMP SymbolInfo::GetFieldMarshal (
718 mdToken tk, // [IN] given a field's memberdef
719 PCCOR_SIGNATURE *ppvNativeType, // [OUT] native type of this field
720 ULONG *pcbNativeType) // [OUT] the count of bytes of *ppvNativeType
721{
722 _ASSERTE(!"NYI");
723 return E_NOTIMPL;
724}
725
726STDMETHODIMP SymbolInfo::GetRVA ( // S_OK or error.
727 mdToken tk, // Member for which to set offset
728 ULONG *pulCodeRVA, // The offset
729 DWORD *pdwImplFlags) // the implementation flags
730{
731 _ASSERTE(!"NYI");
732 return E_NOTIMPL;
733}
734
735STDMETHODIMP SymbolInfo::GetPermissionSetProps (
736 mdPermission pm, // [IN] the permission token.
737 DWORD *pdwAction, // [OUT] CorDeclSecurity.
738 void const **ppvPermission, // [OUT] permission blob.
739 ULONG *pcbPermission) // [OUT] count of bytes of pvPermission.
740{
741 _ASSERTE(!"NYI");
742 return E_NOTIMPL;
743}
744
745STDMETHODIMP SymbolInfo::GetSigFromToken ( // S_OK or error.
746 mdSignature mdSig, // [IN] Signature token.
747 PCCOR_SIGNATURE *ppvSig, // [OUT] return pointer to token.
748 ULONG *pcbSig) // [OUT] return size of signature.
749{
750 _ASSERTE(!"NYI");
751 return E_NOTIMPL;
752}
753
754STDMETHODIMP SymbolInfo::GetModuleRefProps ( // S_OK or error.
755 mdModuleRef mur, // [IN] moduleref token.
756 __out_ecount_part_opt(cchName, *pchName)
757 LPWSTR szName, // [OUT] buffer to fill with the moduleref name.
758 ULONG cchName, // [IN] size of szName in wide characters.
759 ULONG *pchName) // [OUT] actual count of characters in the name.
760{
761 _ASSERTE(!"NYI");
762 return E_NOTIMPL;
763}
764
765STDMETHODIMP SymbolInfo::EnumModuleRefs ( // S_OK or error.
766 HCORENUM *phEnum, // [IN|OUT] pointer to the enum.
767 mdModuleRef rModuleRefs[], // [OUT] put modulerefs here.
768 ULONG cmax, // [IN] max memberrefs to put.
769 ULONG *pcModuleRefs) // [OUT] put # put here.
770{
771 _ASSERTE(!"NYI");
772 return E_NOTIMPL;
773}
774
775STDMETHODIMP SymbolInfo::GetTypeSpecFromToken ( // S_OK or error.
776 mdTypeSpec typespec, // [IN] TypeSpec token.
777 PCCOR_SIGNATURE *ppvSig, // [OUT] return pointer to TypeSpec signature
778 ULONG *pcbSig) // [OUT] return size of signature.
779{
780 _ASSERTE(!"NYI");
781 return E_NOTIMPL;
782}
783
784STDMETHODIMP SymbolInfo::GetNameFromToken ( // Not Recommended! May be removed!
785 mdToken tk, // [IN] Token to get name from. Must have a name.
786 MDUTF8CSTR *pszUtf8NamePtr) // [OUT] Return pointer to UTF8 name in heap.
787{
788 _ASSERTE(!"NYI");
789 return E_NOTIMPL;
790}
791
792STDMETHODIMP SymbolInfo::EnumUnresolvedMethods ( // S_OK, S_FALSE, or error.
793 HCORENUM *phEnum, // [IN|OUT] Pointer to the enum.
794 mdToken rMethods[], // [OUT] Put MemberDefs here.
795 ULONG cMax, // [IN] Max MemberDefs to put.
796 ULONG *pcTokens) // [OUT] Put # put here.
797{
798 _ASSERTE(!"NYI");
799 return E_NOTIMPL;
800}
801
802STDMETHODIMP SymbolInfo::GetUserString ( // S_OK or error.
803 mdString stk, // [IN] String token.
804 __out_ecount_part_opt(cchString, *pchString)
805 LPWSTR szString, // [OUT] Copy of string.
806 ULONG cchString, // [IN] Max chars of room in szString.
807 ULONG *pchString) // [OUT] How many chars in actual string.
808{
809 _ASSERTE(!"NYI");
810 return E_NOTIMPL;
811}
812
813STDMETHODIMP SymbolInfo::GetPinvokeMap ( // S_OK or error.
814 mdToken tk, // [IN] FieldDef or MethodDef.
815 DWORD *pdwMappingFlags, // [OUT] Flags used for mapping.
816 __out_ecount_part_opt(cchImportName, *pchImportName)
817 LPWSTR szImportName, // [OUT] Import name.
818 ULONG cchImportName, // [IN] Size of the name buffer.
819 ULONG *pchImportName, // [OUT] Actual number of characters stored.
820 mdModuleRef *pmrImportDLL) // [OUT] ModuleRef token for the target DLL.
821{
822 _ASSERTE(!"NYI");
823 return E_NOTIMPL;
824}
825
826STDMETHODIMP SymbolInfo::EnumSignatures ( // S_OK or error.
827 HCORENUM *phEnum, // [IN|OUT] pointer to the enum.
828 mdSignature rSignatures[], // [OUT] put signatures here.
829 ULONG cmax, // [IN] max signatures to put.
830 ULONG *pcSignatures) // [OUT] put # put here.
831{
832 _ASSERTE(!"NYI");
833 return E_NOTIMPL;
834}
835
836STDMETHODIMP SymbolInfo::EnumTypeSpecs ( // S_OK or error.
837 HCORENUM *phEnum, // [IN|OUT] pointer to the enum.
838 mdTypeSpec rTypeSpecs[], // [OUT] put TypeSpecs here.
839 ULONG cmax, // [IN] max TypeSpecs to put.
840 ULONG *pcTypeSpecs) // [OUT] put # put here.
841{
842 _ASSERTE(!"NYI");
843 return E_NOTIMPL;
844}
845
846STDMETHODIMP SymbolInfo::EnumUserStrings ( // S_OK or error.
847 HCORENUM *phEnum, // [IN/OUT] pointer to the enum.
848 mdString rStrings[], // [OUT] put Strings here.
849 ULONG cmax, // [IN] max Strings to put.
850 ULONG *pcStrings) // [OUT] put # put here.
851{
852 _ASSERTE(!"NYI");
853 return E_NOTIMPL;
854}
855
856STDMETHODIMP SymbolInfo::GetParamForMethodIndex ( // S_OK or error.
857 mdMethodDef md, // [IN] Method token.
858 ULONG ulParamSeq, // [IN] Parameter sequence.
859 mdParamDef *ppd) // [IN] Put Param token here.
860{
861 _ASSERTE(!"NYI");
862 return E_NOTIMPL;
863}
864
865STDMETHODIMP SymbolInfo::EnumCustomAttributes ( // S_OK or error.
866 HCORENUM *phEnum, // [IN, OUT] COR enumerator.
867 mdToken tk, // [IN] Token to scope the enumeration, 0 for all.
868 mdToken tkType, // [IN] Type of interest, 0 for all.
869 mdCustomAttribute rCustomAttributes[], // [OUT] Put custom attribute tokens here.
870 ULONG cMax, // [IN] Size of rCustomAttributes.
871 ULONG *pcCustomAttributes) // [OUT, OPTIONAL] Put count of token values here.
872{
873 _ASSERTE(!"NYI");
874 return E_NOTIMPL;
875}
876
877STDMETHODIMP SymbolInfo::GetCustomAttributeProps ( // S_OK or error.
878 mdCustomAttribute cv, // [IN] CustomAttribute token.
879 mdToken *ptkObj, // [OUT, OPTIONAL] Put object token here.
880 mdToken *ptkType, // [OUT, OPTIONAL] Put AttrType token here.
881 void const **ppBlob, // [OUT, OPTIONAL] Put pointer to data here.
882 ULONG *pcbSize) // [OUT, OPTIONAL] Put size of date here.
883{
884 _ASSERTE(!"NYI");
885 return E_NOTIMPL;
886}
887
888STDMETHODIMP SymbolInfo::FindTypeRef (
889 mdToken tkResolutionScope, // [IN] ModuleRef, AssemblyRef or TypeRef.
890 LPCWSTR szName, // [IN] TypeRef Name.
891 mdTypeRef *ptr) // [OUT] matching TypeRef.
892{
893 _ASSERTE(!"NYI");
894 return E_NOTIMPL;
895}
896
897STDMETHODIMP SymbolInfo::GetMemberProps (
898 mdToken mb, // The member for which to get props.
899 mdTypeDef *pClass, // Put member's class here.
900 __out_ecount_part_opt(cchMember, *pchMember)
901 LPWSTR szMember, // Put member's name here.
902 ULONG cchMember, // Size of szMember buffer in wide chars.
903 ULONG *pchMember, // Put actual size here
904 DWORD *pdwAttr, // Put flags here.
905 PCCOR_SIGNATURE *ppvSigBlob, // [OUT] point to the blob value of meta data
906 ULONG *pcbSigBlob, // [OUT] actual size of signature blob
907 ULONG *pulCodeRVA, // [OUT] codeRVA
908 DWORD *pdwImplFlags, // [OUT] Impl. Flags
909 DWORD *pdwCPlusTypeFlag, // [OUT] flag for value type. selected ELEMENT_TYPE_*
910 UVCP_CONSTANT *ppValue, // [OUT] constant value
911 ULONG *pcchValue) // [OUT] size of constant string in chars, 0 for non-strings.
912{
913 _ASSERTE(!"NYI");
914 return E_NOTIMPL;
915}
916
917STDMETHODIMP SymbolInfo::GetFieldProps (
918 mdFieldDef mb, // The field for which to get props.
919 mdTypeDef *pClass, // Put field's class here.
920 __out_ecount_part_opt(cchField, *pchField)
921 LPWSTR szField, // Put field's name here.
922 ULONG cchField, // Size of szField buffer in wide chars.
923 ULONG *pchField, // Put actual size here
924 DWORD *pdwAttr, // Put flags here.
925 PCCOR_SIGNATURE *ppvSigBlob, // [OUT] point to the blob value of meta data
926 ULONG *pcbSigBlob, // [OUT] actual size of signature blob
927 DWORD *pdwCPlusTypeFlag, // [OUT] flag for value type. selected ELEMENT_TYPE_*
928 UVCP_CONSTANT *ppValue, // [OUT] constant value
929 ULONG *pcchValue) // [OUT] size of constant string in chars, 0 for non-strings.
930{
931 _ASSERTE(!"NYI");
932 return E_NOTIMPL;
933}
934
935STDMETHODIMP SymbolInfo::GetPropertyProps ( // S_OK, S_FALSE, or error.
936 mdProperty prop, // [IN] property token
937 mdTypeDef *pClass, // [OUT] typedef containing the property declarion.
938 LPCWSTR szProperty, // [OUT] Property name
939 ULONG cchProperty, // [IN] the count of wchar of szProperty
940 ULONG *pchProperty, // [OUT] actual count of wchar for property name
941 DWORD *pdwPropFlags, // [OUT] property flags.
942 PCCOR_SIGNATURE *ppvSig, // [OUT] property type. pointing to meta data internal blob
943 ULONG *pbSig, // [OUT] count of bytes in *ppvSig
944 DWORD *pdwCPlusTypeFlag, // [OUT] flag for value type. selected ELEMENT_TYPE_*
945 UVCP_CONSTANT *ppDefaultValue, // [OUT] constant value
946 ULONG *pcchDefaultValue, // [OUT] size of constant string in chars, 0 for non-strings.
947 mdMethodDef *pmdSetter, // [OUT] setter method of the property
948 mdMethodDef *pmdGetter, // [OUT] getter method of the property
949 mdMethodDef rmdOtherMethod[], // [OUT] other method of the property
950 ULONG cMax, // [IN] size of rmdOtherMethod
951 ULONG *pcOtherMethod) // [OUT] total number of other method of this property
952{
953 _ASSERTE(!"NYI");
954 return E_NOTIMPL;
955}
956
957STDMETHODIMP SymbolInfo::GetParamProps ( // S_OK or error.
958 mdParamDef tk, // [IN]The Parameter.
959 mdMethodDef *pmd, // [OUT] Parent Method token.
960 ULONG *pulSequence, // [OUT] Parameter sequence.
961 __out_ecount_part_opt(cchName, *pchName)
962 LPWSTR szName, // [OUT] Put name here.
963 ULONG cchName, // [OUT] Size of name buffer.
964 ULONG *pchName, // [OUT] Put actual size of name here.
965 DWORD *pdwAttr, // [OUT] Put flags here.
966 DWORD *pdwCPlusTypeFlag, // [OUT] Flag for value type. selected ELEMENT_TYPE_*.
967 UVCP_CONSTANT *ppValue, // [OUT] Constant value.
968 ULONG *pcchValue) // [OUT] size of constant string in chars, 0 for non-strings.
969{
970 _ASSERTE(!"NYI");
971 return E_NOTIMPL;
972}
973
974STDMETHODIMP SymbolInfo::GetCustomAttributeByName ( // S_OK or error.
975 mdToken tkObj, // [IN] Object with Custom Attribute.
976 LPCWSTR szName, // [IN] Name of desired Custom Attribute.
977 const void **ppData, // [OUT] Put pointer to data here.
978 ULONG *pcbData) // [OUT] Put size of data here.
979{
980 _ASSERTE(!"NYI");
981 return E_NOTIMPL;
982}
983
984STDMETHODIMP_(BOOL) SymbolInfo::IsValidToken ( // True or False.
985 mdToken tk) // [IN] Given token.
986{
987 _ASSERTE(!"NYI");
988 return FALSE;
989}
990
991
992STDMETHODIMP SymbolInfo::GetNativeCallConvFromSig ( // S_OK or error.
993 void const *pvSig, // [IN] Pointer to signature.
994 ULONG cbSig, // [IN] Count of signature bytes.
995 ULONG *pCallConv) // [OUT] Put calling conv here (see CorPinvokemap).
996{
997 _ASSERTE(!"NYI");
998 return E_NOTIMPL;
999}
1000
1001STDMETHODIMP SymbolInfo::IsGlobal ( // S_OK or error.
1002 mdToken pd, // [IN] Type, Field, or Method token.
1003 int *pbGlobal) // [OUT] Put 1 if global, 0 otherwise.
1004{
1005 _ASSERTE(!"NYI");
1006 return E_NOTIMPL;
1007}
1008
1009
1010// IMetaDataEmit functions
1011
1012STDMETHODIMP SymbolInfo::SetModuleProps ( // S_OK or error.
1013 LPCWSTR szName) // [IN] If not NULL, the name of the module to set.
1014{
1015 _ASSERTE(!"NYI");
1016 return E_NOTIMPL;
1017}
1018
1019STDMETHODIMP SymbolInfo::Save ( // S_OK or error.
1020 LPCWSTR szFile, // [IN] The filename to save to.
1021 DWORD dwSaveFlags) // [IN] Flags for the save.
1022{
1023 _ASSERTE(!"NYI");
1024 return E_NOTIMPL;
1025}
1026
1027STDMETHODIMP SymbolInfo::SaveToStream ( // S_OK or error.
1028 IStream *pIStream, // [IN] A writable stream to save to.
1029 DWORD dwSaveFlags) // [IN] Flags for the save.
1030{
1031 _ASSERTE(!"NYI");
1032 return E_NOTIMPL;
1033}
1034
1035STDMETHODIMP SymbolInfo::GetSaveSize ( // S_OK or error.
1036 CorSaveSize fSave, // [IN] cssAccurate or cssQuick.
1037 DWORD *pdwSaveSize) // [OUT] Put the size here.
1038{
1039 _ASSERTE(!"NYI");
1040 return E_NOTIMPL;
1041}
1042
1043STDMETHODIMP SymbolInfo::DefineTypeDef ( // S_OK or error.
1044 LPCWSTR szTypeDef, // [IN] Name of TypeDef
1045 DWORD dwTypeDefFlags, // [IN] CustomAttribute flags
1046 mdToken tkExtends, // [IN] extends this TypeDef or typeref
1047 mdToken rtkImplements[], // [IN] Implements interfaces
1048 mdTypeDef *ptd) // [OUT] Put TypeDef token here
1049{
1050 _ASSERTE(!"NYI");
1051 return E_NOTIMPL;
1052}
1053
1054STDMETHODIMP SymbolInfo::DefineNestedType ( // S_OK or error.
1055 LPCWSTR szTypeDef, // [IN] Name of TypeDef
1056 DWORD dwTypeDefFlags, // [IN] CustomAttribute flags
1057 mdToken tkExtends, // [IN] extends this TypeDef or typeref
1058 mdToken rtkImplements[], // [IN] Implements interfaces
1059 mdTypeDef tdEncloser, // [IN] TypeDef token of the enclosing type.
1060 mdTypeDef *ptd) // [OUT] Put TypeDef token here
1061{
1062 _ASSERTE(!"NYI");
1063 return E_NOTIMPL;
1064}
1065
1066STDMETHODIMP SymbolInfo::SetHandler ( // S_OK.
1067 IUnknown *pUnk) // [IN] The new error handler.
1068{
1069 _ASSERTE(!"NYI");
1070 return E_NOTIMPL;
1071}
1072
1073STDMETHODIMP SymbolInfo::DefineMethod ( // S_OK or error.
1074 mdTypeDef td, // Parent TypeDef
1075 LPCWSTR szName, // Name of member
1076 DWORD dwMethodFlags, // Member attributes
1077 PCCOR_SIGNATURE pvSigBlob, // [IN] point to a blob value of CLR signature
1078 ULONG cbSigBlob, // [IN] count of bytes in the signature blob
1079 ULONG ulCodeRVA,
1080 DWORD dwImplFlags,
1081 mdMethodDef *pmd) // Put member token here
1082{
1083 _ASSERTE(!"NYI");
1084 return E_NOTIMPL;
1085}
1086
1087STDMETHODIMP SymbolInfo::DefineMethodImpl ( // S_OK or error.
1088 mdTypeDef td, // [IN] The class implementing the method
1089 mdToken tkBody, // [IN] Method body - MethodDef or MethodRef
1090 mdToken tkDecl) // [IN] Method declaration - MethodDef or MethodRef
1091{
1092 _ASSERTE(!"NYI");
1093 return E_NOTIMPL;
1094}
1095
1096STDMETHODIMP SymbolInfo::DefineTypeRefByName ( // S_OK or error.
1097 mdToken tkResolutionScope, // [IN] ModuleRef, AssemblyRef or TypeRef.
1098 LPCWSTR szName, // [IN] Name of the TypeRef.
1099 mdTypeRef *ptr) // [OUT] Put TypeRef token here.
1100{
1101 _ASSERTE(!"NYI");
1102 return E_NOTIMPL;
1103}
1104
1105STDMETHODIMP SymbolInfo::DefineImportType ( // S_OK or error.
1106 IMetaDataAssemblyImport *pAssemImport, // [IN] Assembly containing the TypeDef.
1107 const void *pbHashValue, // [IN] Hash Blob for Assembly.
1108 ULONG cbHashValue, // [IN] Count of bytes.
1109 IMetaDataImport *pImport, // [IN] Scope containing the TypeDef.
1110 mdTypeDef tdImport, // [IN] The imported TypeDef.
1111 IMetaDataAssemblyEmit *pAssemEmit, // [IN] Assembly into which the TypeDef is imported.
1112 mdTypeRef *ptr) // [OUT] Put TypeRef token here.
1113{
1114 _ASSERTE(!"NYI");
1115 return E_NOTIMPL;
1116}
1117
1118STDMETHODIMP SymbolInfo::DefineMemberRef ( // S_OK or error
1119 mdToken tkImport, // [IN] ClassRef or ClassDef importing a member.
1120 LPCWSTR szName, // [IN] member's name
1121 PCCOR_SIGNATURE pvSigBlob, // [IN] point to a blob value of CLR signature
1122 ULONG cbSigBlob, // [IN] count of bytes in the signature blob
1123 mdMemberRef *pmr) // [OUT] memberref token
1124{
1125 _ASSERTE(!"NYI");
1126 return E_NOTIMPL;
1127}
1128
1129STDMETHODIMP SymbolInfo::DefineImportMember ( // S_OK or error.
1130 IMetaDataAssemblyImport *pAssemImport, // [IN] Assembly containing the Member.
1131 const void *pbHashValue, // [IN] Hash Blob for Assembly.
1132 ULONG cbHashValue, // [IN] Count of bytes.
1133 IMetaDataImport *pImport, // [IN] Import scope, with member.
1134 mdToken mbMember, // [IN] Member in import scope.
1135 IMetaDataAssemblyEmit *pAssemEmit, // [IN] Assembly into which the Member is imported.
1136 mdToken tkParent, // [IN] Classref or classdef in emit scope.
1137 mdMemberRef *pmr) // [OUT] Put member ref here.
1138{
1139 _ASSERTE(!"NYI");
1140 return E_NOTIMPL;
1141}
1142
1143STDMETHODIMP SymbolInfo::DefineEvent(
1144 mdTypeDef td, // [IN] the class/interface on which the event is being defined
1145 LPCWSTR szEvent, // [IN] Name of the event
1146 DWORD dwEventFlags, // [IN] CorEventAttr
1147 mdToken tkEventType, // [IN] a reference (mdTypeRef or mdTypeRef) to the Event class
1148 mdMethodDef mdAddOn, // [IN] required add method
1149 mdMethodDef mdRemoveOn, // [IN] required remove method
1150 mdMethodDef mdFire, // [IN] optional fire method
1151 mdMethodDef rmdOtherMethods[], // [IN] optional array of other methods associate with the event
1152 mdEvent *pmdEvent) // [OUT] output event token
1153{
1154 _ASSERTE(!"NYI");
1155 return E_NOTIMPL;
1156}
1157
1158STDMETHODIMP SymbolInfo::SetClassLayout(
1159 mdTypeDef td, // [IN] typedef
1160 DWORD dwPackSize, // [IN] packing size specified as 1, 2, 4, 8, or 16
1161 COR_FIELD_OFFSET rFieldOffsets[], // [IN] array of layout specification
1162 ULONG ulClassSize) // [IN] size of the class
1163{
1164 _ASSERTE(!"NYI");
1165 return E_NOTIMPL;
1166}
1167
1168STDMETHODIMP SymbolInfo::DeleteClassLayout(
1169 mdTypeDef td) // [IN] typedef whose layout is to be deleted.
1170{
1171 _ASSERTE(!"NYI");
1172 return E_NOTIMPL;
1173}
1174
1175STDMETHODIMP SymbolInfo::SetFieldMarshal(
1176 mdToken tk, // [IN] given a fieldDef or paramDef token
1177 PCCOR_SIGNATURE pvNativeType, // [IN] native type specification
1178 ULONG cbNativeType) // [IN] count of bytes of pvNativeType
1179{
1180 _ASSERTE(!"NYI");
1181 return E_NOTIMPL;
1182}
1183
1184STDMETHODIMP SymbolInfo::DeleteFieldMarshal(
1185 mdToken tk) // [IN] given a fieldDef or paramDef token
1186{
1187 _ASSERTE(!"NYI");
1188 return E_NOTIMPL;
1189}
1190
1191STDMETHODIMP SymbolInfo::DefinePermissionSet(
1192 mdToken tk, // [IN] the object to be decorated.
1193 DWORD dwAction, // [IN] CorDeclSecurity.
1194 void const *pvPermission, // [IN] permission blob.
1195 ULONG cbPermission, // [IN] count of bytes of pvPermission.
1196 mdPermission *ppm) // [OUT] returned permission token.
1197{
1198 _ASSERTE(!"NYI");
1199 return E_NOTIMPL;
1200}
1201
1202STDMETHODIMP SymbolInfo::SetRVA ( // S_OK or error.
1203 mdMethodDef md, // [IN] Method for which to set offset
1204 ULONG ulRVA) // [IN] The offset
1205{
1206 _ASSERTE(!"NYI");
1207 return E_NOTIMPL;
1208}
1209
1210STDMETHODIMP SymbolInfo::DefineModuleRef ( // S_OK or error.
1211 LPCWSTR szName, // [IN] DLL name
1212 mdModuleRef *pmur) // [OUT] returned
1213{
1214 _ASSERTE(!"NYI");
1215 return E_NOTIMPL;
1216}
1217
1218STDMETHODIMP SymbolInfo::SetParent ( // S_OK or error.
1219 mdMemberRef mr, // [IN] Token for the ref to be fixed up.
1220 mdToken tk) // [IN] The ref parent.
1221{
1222 _ASSERTE(!"NYI");
1223 return E_NOTIMPL;
1224}
1225
1226STDMETHODIMP SymbolInfo::GetTokenFromTypeSpec ( // S_OK or error.
1227 PCCOR_SIGNATURE pvSig, // [IN] TypeSpec Signature to define.
1228 ULONG cbSig, // [IN] Size of signature data.
1229 mdTypeSpec *ptypespec) // [OUT] returned TypeSpec token.
1230{
1231 _ASSERTE(!"NYI");
1232 return E_NOTIMPL;
1233}
1234
1235STDMETHODIMP SymbolInfo::SaveToMemory ( // S_OK or error.
1236 void *pbData, // [OUT] Location to write data.
1237 ULONG cbData) // [IN] Max size of data buffer.
1238{
1239 _ASSERTE(!"NYI");
1240 return E_NOTIMPL;
1241}
1242
1243STDMETHODIMP SymbolInfo::DefineUserString ( // Return code.
1244 LPCWSTR szString, // [IN] User literal string.
1245 ULONG cchString, // [IN] Length of string.
1246 mdString *pstk) // [OUT] String token.
1247{
1248 _ASSERTE(!"NYI");
1249 return E_NOTIMPL;
1250}
1251
1252STDMETHODIMP SymbolInfo::DeleteToken ( // Return code.
1253 mdToken tkObj) // [IN] The token to be deleted
1254{
1255 _ASSERTE(!"NYI");
1256 return E_NOTIMPL;
1257}
1258
1259STDMETHODIMP SymbolInfo::SetMethodProps ( // S_OK or error.
1260 mdMethodDef md, // [IN] The MethodDef.
1261 DWORD dwMethodFlags, // [IN] Method attributes.
1262 ULONG ulCodeRVA, // [IN] Code RVA.
1263 DWORD dwImplFlags) // [IN] Impl flags.
1264{
1265 _ASSERTE(!"NYI");
1266 return E_NOTIMPL;
1267}
1268
1269STDMETHODIMP SymbolInfo::SetTypeDefProps ( // S_OK or error.
1270 mdTypeDef td, // [IN] The TypeDef.
1271 DWORD dwTypeDefFlags, // [IN] TypeDef flags.
1272 mdToken tkExtends, // [IN] Base TypeDef or TypeRef.
1273 mdToken rtkImplements[]) // [IN] Implemented interfaces.
1274{
1275 _ASSERTE(!"NYI");
1276 return E_NOTIMPL;
1277}
1278
1279STDMETHODIMP SymbolInfo::SetEventProps ( // S_OK or error.
1280 mdEvent ev, // [IN] The event token.
1281 DWORD dwEventFlags, // [IN] CorEventAttr.
1282 mdToken tkEventType, // [IN] A reference (mdTypeRef or mdTypeRef) to the Event class.
1283 mdMethodDef mdAddOn, // [IN] Add method.
1284 mdMethodDef mdRemoveOn, // [IN] Remove method.
1285 mdMethodDef mdFire, // [IN] Fire method.
1286 mdMethodDef rmdOtherMethods[])// [IN] Array of other methods associate with the event.
1287{
1288 _ASSERTE(!"NYI");
1289 return E_NOTIMPL;
1290}
1291
1292STDMETHODIMP SymbolInfo::SetPermissionSetProps ( // S_OK or error.
1293 mdToken tk, // [IN] The object to be decorated.
1294 DWORD dwAction, // [IN] CorDeclSecurity.
1295 void const *pvPermission, // [IN] Permission blob.
1296 ULONG cbPermission, // [IN] Count of bytes of pvPermission.
1297 mdPermission *ppm) // [OUT] Permission token.
1298{
1299 _ASSERTE(!"NYI");
1300 return E_NOTIMPL;
1301}
1302
1303STDMETHODIMP SymbolInfo::DefinePinvokeMap ( // Return code.
1304 mdToken tk, // [IN] FieldDef or MethodDef.
1305 DWORD dwMappingFlags, // [IN] Flags used for mapping.
1306 LPCWSTR szImportName, // [IN] Import name.
1307 mdModuleRef mrImportDLL) // [IN] ModuleRef token for the target DLL.
1308{
1309 _ASSERTE(!"NYI");
1310 return E_NOTIMPL;
1311}
1312
1313STDMETHODIMP SymbolInfo::SetPinvokeMap ( // Return code.
1314 mdToken tk, // [IN] FieldDef or MethodDef.
1315 DWORD dwMappingFlags, // [IN] Flags used for mapping.
1316 LPCWSTR szImportName, // [IN] Import name.
1317 mdModuleRef mrImportDLL) // [IN] ModuleRef token for the target DLL.
1318{
1319 _ASSERTE(!"NYI");
1320 return E_NOTIMPL;
1321}
1322
1323STDMETHODIMP SymbolInfo::DeletePinvokeMap ( // Return code.
1324 mdToken tk) // [IN] FieldDef or MethodDef.
1325{
1326 _ASSERTE(!"NYI");
1327 return E_NOTIMPL;
1328}
1329
1330// New CustomAttribute functions.
1331STDMETHODIMP SymbolInfo::DefineCustomAttribute ( // Return code.
1332 mdToken tkObj, // [IN] The object to put the value on.
1333 mdToken tkType, // [IN] Type of the CustomAttribute (TypeRef/TypeDef).
1334 void const *pCustomAttribute, // [IN] The custom value data.
1335 ULONG cbCustomAttribute, // [IN] The custom value data length.
1336 mdCustomAttribute *pcv) // [OUT] The custom value token value on return.
1337{
1338 _ASSERTE(!"NYI");
1339 return E_NOTIMPL;
1340}
1341
1342STDMETHODIMP SymbolInfo::SetCustomAttributeValue ( // Return code.
1343 mdCustomAttribute pcv, // [IN] The custom value token whose value to replace.
1344 void const *pCustomAttribute, // [IN] The custom value data.
1345 ULONG cbCustomAttribute)// [IN] The custom value data length.
1346{
1347 _ASSERTE(!"NYI");
1348 return E_NOTIMPL;
1349}
1350
1351STDMETHODIMP SymbolInfo::DefineField ( // S_OK or error.
1352 mdTypeDef td, // Parent TypeDef
1353 LPCWSTR szName, // Name of member
1354 DWORD dwFieldFlags, // Member attributes
1355 PCCOR_SIGNATURE pvSigBlob, // [IN] point to a blob value of CLR signature
1356 ULONG cbSigBlob, // [IN] count of bytes in the signature blob
1357 DWORD dwCPlusTypeFlag, // [IN] flag for value type. selected ELEMENT_TYPE_*
1358 void const *pValue, // [IN] constant value
1359 ULONG cchValue, // [IN] size of constant value (string, in wide chars).
1360 mdFieldDef *pmd) // [OUT] Put member token here
1361{
1362 _ASSERTE(!"NYI");
1363 return E_NOTIMPL;
1364}
1365
1366STDMETHODIMP SymbolInfo::DefineProperty (
1367 mdTypeDef td, // [IN] the class/interface on which the property is being defined
1368 LPCWSTR szProperty, // [IN] Name of the property
1369 DWORD dwPropFlags, // [IN] CorPropertyAttr
1370 PCCOR_SIGNATURE pvSig, // [IN] the required type signature
1371 ULONG cbSig, // [IN] the size of the type signature blob
1372 DWORD dwCPlusTypeFlag, // [IN] flag for value type. selected ELEMENT_TYPE_*
1373 void const *pValue, // [IN] constant value
1374 ULONG cchValue, // [IN] size of constant value (string, in wide chars).
1375 mdMethodDef mdSetter, // [IN] optional setter of the property
1376 mdMethodDef mdGetter, // [IN] optional getter of the property
1377 mdMethodDef rmdOtherMethods[], // [IN] an optional array of other methods
1378 mdProperty *pmdProp) // [OUT] output property token
1379{
1380 _ASSERTE(!"NYI");
1381 return E_NOTIMPL;
1382}
1383
1384STDMETHODIMP SymbolInfo::DefineParam (
1385 mdMethodDef md, // [IN] Owning method
1386 ULONG ulParamSeq, // [IN] Which param
1387 LPCWSTR szName, // [IN] Optional param name
1388 DWORD dwParamFlags, // [IN] Optional param flags
1389 DWORD dwCPlusTypeFlag, // [IN] flag for value type. selected ELEMENT_TYPE_*
1390 void const *pValue, // [IN] constant value
1391 ULONG cchValue, // [IN] size of constant value (string, in wide chars).
1392 mdParamDef *ppd) // [OUT] Put param token here
1393{
1394 _ASSERTE(!"NYI");
1395 return E_NOTIMPL;
1396}
1397
1398STDMETHODIMP SymbolInfo::SetFieldProps ( // S_OK or error.
1399 mdFieldDef fd, // [IN] The FieldDef.
1400 DWORD dwFieldFlags, // [IN] Field attributes.
1401 DWORD dwCPlusTypeFlag, // [IN] Flag for the value type, selected ELEMENT_TYPE_*
1402 void const *pValue, // [IN] Constant value.
1403 ULONG cchValue) // [IN] size of constant value (string, in wide chars).
1404{
1405 _ASSERTE(!"NYI");
1406 return E_NOTIMPL;
1407}
1408
1409STDMETHODIMP SymbolInfo::SetPropertyProps ( // S_OK or error.
1410 mdProperty pr, // [IN] Property token.
1411 DWORD dwPropFlags, // [IN] CorPropertyAttr.
1412 DWORD dwCPlusTypeFlag, // [IN] Flag for value type, selected ELEMENT_TYPE_*
1413 void const *pValue, // [IN] Constant value.
1414 ULONG cchValue, // [IN] size of constant value (string, in wide chars).
1415 mdMethodDef mdSetter, // [IN] Setter of the property.
1416 mdMethodDef mdGetter, // [IN] Getter of the property.
1417 mdMethodDef rmdOtherMethods[])// [IN] Array of other methods.
1418{
1419 _ASSERTE(!"NYI");
1420 return E_NOTIMPL;
1421}
1422
1423STDMETHODIMP SymbolInfo::SetParamProps ( // Return code.
1424 mdParamDef pd, // [IN] Param token.
1425 LPCWSTR szName, // [IN] Param name.
1426 DWORD dwParamFlags, // [IN] Param flags.
1427 DWORD dwCPlusTypeFlag, // [IN] Flag for value type. selected ELEMENT_TYPE_*.
1428 void const *pValue, // [OUT] Constant value.
1429 ULONG cchValue) // [IN] size of constant value (string, in wide chars).
1430{
1431 _ASSERTE(!"NYI");
1432 return E_NOTIMPL;
1433}
1434
1435// Specialized Custom Attributes for security.
1436STDMETHODIMP SymbolInfo::DefineSecurityAttributeSet ( // Return code.
1437 mdToken tkObj, // [IN] Class or method requiring security attributes.
1438 COR_SECATTR rSecAttrs[], // [IN] Array of security attribute descriptions.
1439 ULONG cSecAttrs, // [IN] Count of elements in above array.
1440 ULONG *pulErrorAttr) // [OUT] On error, index of attribute causing problem.
1441{
1442 _ASSERTE(!"NYI");
1443 return E_NOTIMPL;
1444}
1445
1446STDMETHODIMP SymbolInfo::ApplyEditAndContinue ( // S_OK or error.
1447 IUnknown *pImport) // [IN] Metadata from the delta PE.
1448{
1449 _ASSERTE(!"NYI");
1450 return E_NOTIMPL;
1451}
1452
1453STDMETHODIMP SymbolInfo::TranslateSigWithScope (
1454 IMetaDataAssemblyImport *pAssemImport, // [IN] importing assembly interface
1455 const void *pbHashValue, // [IN] Hash Blob for Assembly.
1456 ULONG cbHashValue, // [IN] Count of bytes.
1457 IMetaDataImport *import, // [IN] importing interface
1458 PCCOR_SIGNATURE pbSigBlob, // [IN] signature in the importing scope
1459 ULONG cbSigBlob, // [IN] count of bytes of signature
1460 IMetaDataAssemblyEmit *pAssemEmit, // [IN] emit assembly interface
1461 IMetaDataEmit *emit, // [IN] emit interface
1462 PCOR_SIGNATURE pvTranslatedSig, // [OUT] buffer to hold translated signature
1463 ULONG cbTranslatedSigMax,
1464 ULONG *pcbTranslatedSig)// [OUT] count of bytes in the translated signature
1465{
1466 _ASSERTE(!"NYI");
1467 return E_NOTIMPL;
1468}
1469
1470STDMETHODIMP SymbolInfo::SetMethodImplFlags ( // [IN] S_OK or error.
1471 mdMethodDef md, // [IN] Method for which to set ImplFlags
1472 DWORD dwImplFlags)
1473{
1474 _ASSERTE(!"NYI");
1475 return E_NOTIMPL;
1476}
1477
1478STDMETHODIMP SymbolInfo::SetFieldRVA ( // [IN] S_OK or error.
1479 mdFieldDef fd, // [IN] Field for which to set offset
1480 ULONG ulRVA) // [IN] The offset
1481{
1482 _ASSERTE(!"NYI");
1483 return E_NOTIMPL;
1484}
1485
1486STDMETHODIMP SymbolInfo::Merge ( // S_OK or error.
1487 IMetaDataImport *pImport, // [IN] The scope to be merged.
1488 IMapToken *pHostMapToken, // [IN] Host IMapToken interface to receive token remap notification
1489 IUnknown *pHandler) // [IN] An object to receive to receive error notification.
1490{
1491 _ASSERTE(!"NYI");
1492 return E_NOTIMPL;
1493}
1494
1495STDMETHODIMP SymbolInfo::MergeEnd () // S_OK or error.
1496{
1497 _ASSERTE(!"NYI");
1498 return E_NOTIMPL;
1499}
1500
1501
1502