Evaluating functions using IDebugger Evaluate member. 
Author Message
 Evaluating functions using IDebugger Evaluate member.

Hi

I'm writing an Add-In in VC6, and I need to be able to
evaluate a function. This can be done in the watch window
(you can put a function, e.g. the HelloWorld one shown
below), and the function will be evaluated.

However, the Evaluate() member of the IDegugger interface
fails with "Cannot Evaluate This Expression".

Code snippets follow.

Thanks

Carl

In the main program: -

void HelloWorld()
{
   printf("HelloWorld:);

Quote:
}

main()
{
//call the add-in command via the menu button at this point
   _asm{int 3}

Quote:
}

In the add-in:-

   IDe{*filter*}* pDe{*filter*};
   VERIFY_OK(m_pApplication->get_De{*filter*}((IDispatch**)
&pDe{*filter*}));

   BSTR outPut;
   VERIFY_OK(pDe{*filter*}->Evaluate("HelloWorld()", &outPut));



Fri, 02 Jul 2004 10:48:02 GMT  
 Evaluating functions using IDebugger Evaluate member.
Function evaluation was expressly prevented when using the IDe{*filter*}
interface for reasons I cannot remember. When we threw out the MSDev
de{*filter*} automation interfaces for VC7, we fixed it.

--
This posting is provided "AS IS" with no warranties, and confers no rights.


Quote:
> Hi

> I'm writing an Add-In in VC6, and I need to be able to
> evaluate a function. This can be done in the watch window
> (you can put a function, e.g. the HelloWorld one shown
> below), and the function will be evaluated.

> However, the Evaluate() member of the IDegugger interface
> fails with "Cannot Evaluate This Expression".

> Code snippets follow.

> Thanks

> Carl

> In the main program: -

> void HelloWorld()
> {
>    printf("HelloWorld:);
> }

> main()
> {
> //call the add-in command via the menu button at this point
>    _asm{int 3}
> }

> In the add-in:-

>    IDe{*filter*}* pDe{*filter*};
>    VERIFY_OK(m_pApplication->get_De{*filter*}((IDispatch**)
> &pDe{*filter*}));

>    BSTR outPut;
>    VERIFY_OK(pDe{*filter*}->Evaluate("HelloWorld()", &outPut));



Tue, 13 Jul 2004 04:51:27 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Calling functions from IDebugger Evaluate() member

2. Evaluating a member function implemented in dll

3. Using a pointer to a class function but not evaluating correctly

4. Class function pointer does not evaluate to a function

5. Turning a string into a function and evaluate it

6. Function wanted to evaluate string

7. error C2064: term does not evaluate to a function

8. Evaluating a function during BreakpointHit event

9. How can you evaluate an arbitrary function?

10. wanted: function to evaluate ASCII expressions

11. warning C4550: expression evaluates to a function which is missing an argument list

12. why does this term not evaluate to a function

 

 
Powered by phpBB® Forum Software