Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / March 2008

Tip: Looking for answers? Try searching our database.

The cpu usage is increased between com and atl

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
lightdoll - 12 Mar 2008 14:29 GMT
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.OnSetValue += new
_IEasyBridgeEvents_OnSet(easyBridege_OnSetEventId);

void easyBridege_OnSetEventId(string A, string B, int i , string C)
{
----
}

best regards.
Willy Denoyette [MVP] - 13 Mar 2008 00:32 GMT
> hello everyone.
>
[quoted text clipped - 14 lines]
> 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.

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.