Re: Alternatives to InvokeMethod

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Ringo (anonymous_at_discussions.microsoft.com)
Date: 04/03/04


Date: Sat, 3 Apr 2004 06:19:18 -0800

Thanks, Armin

unfortunately, the objects can have any method name and
the component will only know which methods to call from a
text file. I can't recompile this component to add new
interfaces and the objects being passed to it will always
have there own set of methods.

>-----Original Message-----
>"Ringo" <anonymous@discussions.microsoft.com> schrieb
>> I've created a component that takes a class as an input
>> and executes methods on the class based on a set of
text
>> instructions. The instructions are the names of the
>> methods to be executed and are different for each class
>> passed in. I've been using InvokeMethod to do this and
it
>> works, but, it's TOO slow.
>>
>> I've used the "eval" method in Jscript to do this sort
of
>> thing and it doesn't seem to be as slow.
>>
>> I'm about to try dynamic compilation but it seems
quite a
>> bit more work (and is more likely to develop bugs).
>>
>> I'd appreciate any ideas to solve this problem.
>
>
>If possible, the component, or the library containing
the component, can
>define an interface that must be implemented in the
class passed to the
>component. This requires select case blocks within the
component to call the
>appropriate method depending on the instructions, but I
think it should be
>faster than reflection.
>
>
>--
>Armin
>
>How to quote and why:
>http://www.plig.net/nnq/nquote.html
>http://www.netmeister.org/news/learn2quote.html
>
>.
>



Relevant Pages

  • Re: Alternatives to InvokeMethod
    ... "Ringo" schrieb ... > and executes methods on the class based on a set of text ... The instructions are the names of the ...
    (microsoft.public.dotnet.languages.vb)
  • Alternatives to InvokeMethod
    ... and executes methods on the class based on a set of text ... The instructions are the names of the ... I'm about to try dynamic compilation but it seems quite a ... bit more work (and is more likely to develop bugs). ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Where is Excel.h?
    ... The instructions say to select Excel.exe. ... In the Add Class dialog box select MFC Class From TypeLib ... Then you can simply select the interfaces that you are interested in and ... knowledgebase article. ...
    (microsoft.public.vc.mfc)
  • Re: XFree86 port broke for Matrox G550
    ... On Thursday 16 of June 2005 13:30, Steve Friedrich wrote: ... The instructions that I had previously had me using a couple ... > files from Matrox, but to my knowledge, there wasn't a port for a server. ... you'll have to recompile them after XFree upgrade. ...
    (freebsd-questions)
  • Re: FC3 performance on non-P4 CPUs
    ... > does this affect earlier CPUs? ... Will I gain anything if I recompile ... Instructions are scheduled optimally for P4, ... Recompiling will gain you a tiny percentage speed ...
    (Fedora)