The cpu usage is increased between com and atl

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?bGlnaHRkb2xs?=

    The cpu usage is increased between com and atl

    hello everyone.

    i made a singleton com with sink.
    then i use the com in C# with sink.

    -- win32dll -atl com -event of atl(if i don't use this code, it's ok) ->
    C#

    so i wrote my sample code below.
    1.the client call the function of com in thread.
    2.the function in COM will fire to C#
    then the cpu usage is increased.
    how to solve this kind of problem.
    i have to call the function of com continuely,

    do you have any idea to solve this kind of problem.
    please , teach me ...

    -- Client Side -
    i called a function of com from client in thread.
    SetValue("AAA", "BBB", __Int, chBuffer);

    SetValue("BBB", "CCC", __Int, chBuffer);

    -- com side --
    SetValue(BSTR A, BSTR B, int i, BSTR C)
    {
    Fire_Event();
    }

    -- C# Code
    m_easyBridege.O nSetValue += new
    _IEasyBridgeEve nts_OnSet(easyB ridege_OnSetEve ntId);

    void easyBridege_OnS etEventId(strin g A, string B, int i , string C)
    {
    ----
    }

    best regards.
  • Willy Denoyette [MVP]

    #2
    Re: The cpu usage is increased between com and atl

    "lightdoll" <djyang32@naver .comwrote in message
    news:2C4E65A7-CAEF-4414-955B-595092A767F7@mi crosoft.com...
    hello everyone.
    >
    i made a singleton com with sink.
    then i use the com in C# with sink.
    >
    -- win32dll -atl com -event of atl(if i don't use this code, it's
    ok) ->
    C#
    >
    so i wrote my sample code below.
    1.the client call the function of com in thread.
    2.the function in COM will fire to C#
    then the cpu usage is increased.
    how to solve this kind of problem.
    i have to call the function of com continuely,
    >
    do you have any idea to solve this kind of problem.
    please , teach me ...
    >
    Not sure what problem you have with this.
    You can't run code without consuming CPU resources, especially when you call
    methods repeatedly, that do nothing else than calling you back .

    Willy.



    Comment

    Working...