• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

InvokeHelper in Microsoft Visual C++ .NET

I am working on an inherited application. I am at my wits end as to what this is doing. Actually, I understand the parameters other than the very first one.

In particular, what is 0x4 doing? My understanding is that this maps to a method somewhere. How do I find out what it is mapping to?

unsigned long result;
InvokeHelper(0x4, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
 
That is a DSPID which does map to a property. Normally they are #defines, hardcoding a value is bad practice. The meaning of that value should be in either:
The header file for that object
The documentation for that object
The IDL file for that object
The type library for that object (.dll/.tlb, view in oleview.exe)
 
nickbits,

Yup ... this code isn't good, but I've seen worse. No comments either!

Thanks, off to learn about the topics you mentioned.

 
Back
Top