I've implemented the .Net Profiler callback which allows me to get data about all the functions called in a .NET application. The function callback works great. Starting in the callback, I make a call to
GetModuleMetaData(moduleId, ofRead, IID_IMetaDataImport, (IUnknown**)&metaDataImport);
to which I make a subsequent call to
metaDataImport->EnumParams(&phEnum, (mdMethodDef)metaDataToken, rParams, cMax, &pcTokens);
pcTokens contains an array of parameter reference tokens. I can use those tokens to get the parameter names with the following call.
metaDataImport->GetParamProps(rParams[i], &(mdMethodDef)metaDataToken, &pulSequence, szName3, cchName3, &pchName3, NULL, NULL, NULL, NULL);
I'm stuck at trying to find the type of each parameter. I can't find any documentation that would give me the parameter type. https://learn.microsoft.com/en-us/dotnet/framework/unmanaged-api/metadata/imetadataimport-interface
Any thoughts?