dotnet / dotnet/docs

Invalid Remark on GetClassIDInfo2

Open
#26,220 0 comments 0 reactions 1 assignee Claimed by @tommcdon View on GitHub
dotnet-framework/svc
Dominant language
No language data
Stars
4.8k
Forks
6.1k
Avg merge
19h 10m
Merged PRs (30d)
268

Description

In the Remarks, the following section is not correct:
_After GetClassIDInfo2 returns, you must verify that the typeArgs buffer was large enough to contain all the ClassID values. To do this, compare the value that pcNumTypeArgs points to with the value of the cNumTypeArgs parameter. If pcNumTypeArgs points to a value that is larger than cNumTypeArgs, allocate a larger typeArgs buffer, update cNumTypeArgs with the new, larger size, and call GetClassIDInfo2 again._

cNumTypeArgs MUST be set to 0 in order to get the total number of generic parameters (if any). If one pass a value that is less than the total count, *pcNumTypeArgs will contain the same value as the passed cNumTypeArgs. And remove "_Alternatively_" to the next section because this is what MUST be done

I validated the behavior in .NET Framework and .NET Core

---
#### Document Details

⚠ *Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.*

* ID: ed01fe97-046f-33c0-c8bc-fe1626d0574c
* Version Independent ID: fb019d72-5911-6fad-1cf5-f796081e7b94
* Content: [ICorProfilerInfo2::GetClassIDInfo2 Method](https://docs.microsoft.com/en-us/dotnet/framework/unmanaged-api/profiling/icorprofilerinfo2-getclassidinfo2-method)
* Content Source: [docs/framework/unmanaged-api/profiling/icorprofilerinfo2-getclassidinfo2-method.md](https://github.com/dotnet/docs/blob/main/docs/framework/unmanaged-api/profiling/icorprofilerinfo2-getclassidinfo2-method.md)
* Product: **dotnet-framework**
* GitHub Login: @tommcdon
* Microsoft Alias: **tommcdon**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.