|
Thanks for the Information.
Could you please give any example of Windows service written in native code ?
Thanks and Regards,
Venkat.
|
|
|
|
|
|
I have checked the articles with the author name "Vagif Abilov" . I could not get any.
|
|
|
|
|
I've given link in previous reply.
|
|
|
|
|
Joe Woodbury wrote: I think writing services in managed code is a bad idea.
May I ask Why?
|
|
|
|
|
Two reasons:
Performance and resource bloat.
While some .NET code can, in fact, run faster than native code, my extensive testing has found that this is mostly in UI code; in non-UI code, this is rarely the case and I've found .NET code typically runs about 30-50% slower (after JIT.) While some services do nothing the vast majority of the time, many are required to periodically do small things as fast as possible. In this, well crafted native code is best. (Yes, I said well crafted; well crafted .NET code is very probably better than crappy native code, but that goes without saying for just about any software.)
Resource bloat is another problem; even "small" .NET applications take up lots of memory and resources. Among other things, this causes slow boots and long shutdowns. If an application or service is truly idle for a long time, and other things are happening on the system, odds are it's memory will eventually get paged out. With .NET, the amound of demand paging when the appliation or service becomes active again is quite significant. (This is one thing that really irritates me with the ATI Catalyst Control Center.)
Do recognize that many serverices have two component; the memory resident component, which should be lean and mean, and a management console or something comparable which is launched on demand. Using .NET for the latter may make perfect sense (though I've honestly yet to see someone actually do it efficiently on the client for a commercial product.)
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
Thank you for the excellent reply!
With so many choices in frameworks, languages, SDKs, etc., I'm constantly having to make decisions
on which way to go based on performance, ease of use, extensibility, longevity, etc. and it's
nice to add others' real-life experience and opinion to the "equation".
Had you answered "Because I heard it's slow" I would have screamed.
Thanks again,
Mark
|
|
|
|
|
my code:
CComQIPtr<IHTMLDOMNode> pRootNode(lpParentDisp);
CComPtr<IDispatch> spChildren;
if(FAILED(pRootNode->get_childNodes(&spChildren)))return;
CComQIPtr<IHTMLDOMChildrenCollection> pChildColl(spChildren);
long lCount = 0;
pChildColl->get_length(&lCount);
for (long l = 0;l<lCount;l++)
{
CComPtr<IDispatch> spChild;
pChildColl->item(l,&spChild);
CComQIPtr<IHTMLDOMNode> pChild(spChild);
CComQIPtr<IHTMLElement> pElement(pChild); // I don't obtain the point
}
please somebody help me ! thanks........
-- modified at 22:17 Thursday 7th December, 2006
I'm a good man!
-- modified at 22:17 Thursday 7th December, 2006
|
|
|
|
|
guti_milan wrote: CComQIPtr<ihtmldomnode> pChild(spChild);
CComQIPtr<ihtmlelement> pElement(pChild); // I don't obtain the point
SEE IHTMLDOMNode::childNodes
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and you
|
|
|
|
|
thank you!
I'm a good man!
|
|
|
|
|
guti_milan wrote:
I'm a good man!
I am BAD.... [ ]
<div class='ForumSig'>"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers, Alok Gupta VC Forum Q&A :- I/ IV Support CRY- Child Relief and you </div>
|
|
|
|
|
in MS Paint (or Paint-Brush), when we draw a line, a sample line is drawn befor actual drawing hapends, which tells user where the line is and its size.
the sample line moves peaceful with mouse's moving.
Q: how to draw the sample line? is it drawn on bitmap directly or on another interface? any special tech used?
thx
|
|
|
|
|
includeh10 wrote: how to draw the sample line? is it drawn on bitmap directly or on another interface? any special tech used?
RubberBand Lines[^].
|
|
|
|
|
It's drawn direct to the DC in the WM_PAINT event.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
im making a simple wav audio player. i need a volume control (i.e. slider) which is independent from the windows main vol ctrl - that is, modifying the volume in the audio player should not affect the windows volume settings. i am using playsound(). please point me in the right direction. thanks.
|
|
|
|
|
Controlling volume by process is only available in Vista.
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
Hi,
Can someone please tell me how to enable the DROP DOWN list while writing code?
For example:
m_open.drop down list so that I can select what I want
Thanks
C++Prog
|
|
|
|
|
Do you mean drop the list down programatically?
m_open.ShowDropDown( TRUE );
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
no...not programatically.....but its default. Like when I type m_open.
After "." it should open me a drop down list and we can select anything. For example "IsWindowEnabled". And then I won't have to type it, I can select and then press ENTER.
I hope I explained it now.
Thanks
C++Prog
|
|
|
|
|
Ah, you mean Intellisense. It's touch and go for me on VC6 - sometimes I get it, sometimes I don't. I have no idea what breaks it.
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
O okay....but thanks anyways for telling me what is it called..Smile.
Intellisense..now will remember it.
Thanks
C++Prog
|
|
|
|
|
First make sure that the variable's type is known (as seen by the compiler) at the point
you are typing. If the variable isn't already defined then intellisense won't know what to put
in the list.
If that doesn't work then possibly the intellisense database is corrupt (that's been happening
for many VS versions ). To rebuild the intellisense database:
1) Exit VS or at least close the project/solution.
2) Find the <solutionname>.ncb file in your solution/project folder.
3) Rename it to something like <solutionname>_bak.ncb if you want to be safe
4) If you didn't rename it then delete it.
5) Open the project/solution in VS and a new .ncb file will be built
|
|
|
|
|
How would I make sure that the variable type is known at the point of typing?
I rebuilded the .ncb file but that doesn't work.
Thanks for your effort.
C++Prog
|
|
|
|
|
celllllllll wrote: How would I make sure that the variable type is known at the point of typing?
Just like the compiler sees it - startin at the top, through all include files and their included
files.
If I just start typing:
myvariable.
Intellisense knows nothing.
If I type:
CWnd myvariable;
myvariable.
Intellisense gives me the list of CWnd members, assuming somewhere above these lines I have
included the header file declaring the CWnd class.
p.s.
I still kind of chuckle every time I type the word "Intellisense", considering it is the #1 problem
I've had over the years with VS
*edit* One other thing - Intellisense has always started working again at some point for me
|
|
|
|
|
Ah shoot - I said "one other thing" - I lied.
Also, if there's a coding error above the line you're typing and intellisense can't parse through
the error then it will stop working as well. So, sometimes compiling (if the error isn't obvious)
will show you where it's getting hung up.
Mark
|
|
|
|