I am working on a project where I need to extract binary name information from a pdb(program database information) file. Earlier I thought that I will be able to do it as:
hr = CoCreateInstance(__uuidof(DiaSource),
NULL,
CLSCTX_INPROC_SERVER,
__uuidof(IDiaDataSource),
(void **) ppSource);
hr = (*ppSource)->openSession(ppSession);
hr = (*ppSession)->get_globalScope(ppGlobal);
BSTR name;
(*ppGlobal)->get_name(&name);
This is the snippet with very no error handling, I just realized that this will just yield information about the pdb filename and not binary name. Can anyone please suggest any way to do this?