views:

119

answers:

2

As part of a JavaScript Profiler for IE 6/7 I needed to load a custom debugger that I created into IE. I got this working fine on XP, but couldn't get it working on Vista (full story here: http://damianblog.com/2008/09/09/tracejs-v2-rip/).

The call to GetProviderProcessData is failing on Vista. Anyone have any suggestions?

Thanks, Damian

// Create the MsProgramProvider
IDebugProgramProvider2* pIDebugProgramProvider2 = 0;
HRESULT st = CoCreateInstance(CLSID_MsProgramProvider, 0, CLSCTX_ALL, IID_IDebugProgramProvider2, (void**)&pIDebugProgramProvider2);
if(st != S_OK) {
 return st;
}

// Get the IDebugProgramNode2 instances running in this process
AD_PROCESS_ID processID;
processID.ProcessId.dwProcessId = GetCurrentProcessId();
processID.ProcessIdType = AD_PROCESS_ID_SYSTEM;

CONST_GUID_ARRAY engineFilter;
engineFilter.dwCount = 0;

PROVIDER_PROCESS_DATA processData;

st = pIDebugProgramProvider2->GetProviderProcessData(PFLAG_GET_PROGRAM_NODES|PFLAG_DEBUGGEE, 0, processID, engineFilter, &processData);
if(st != S_OK) {
 ShowError(L"GPPD Failed", st);
 pIDebugProgramProvider2->Release();
 return st;
}
A: 

I'm not familiar with these interfaces, but unexpected failures in Vista may require being past a UAC prompt. Have you tried starting the debugger with admin privileges?

millenomi
Yes I've tried that -- thanks for the suggestion though.
Damian Mehers
+1  A: 

It would help to know what the error result was.

Possible problems I can think of:

If your getting permission denied, your most likely missing some requried Privilege in your ACL. New ones are sometimes not doceumented well, check the latest Platform SDK headers to see if any new ones that still out. It may be that under vista the Privilege is not assigned my default to your ACL any longer.

If your getting some sort of Not Found type error, then it may be 32bit / 64bit problem. Your debbugging API may only be available under 64bit COM on vista 64. The 32bit/64bit interoperation can be very confusing.

Shane Powell
I've stopped working on this, since IE8 provides integrated profiler support - I'll mark your response as the answer and upvote it.
Damian Mehers