|
So just because a better threading lib exists in C one shouldn't use threading in .NET? Weird logic. I've used multithreading in dozens of situations in .NET and although it is not "aware" of the number of physical processors/cores it generally does a good job. Why? Because the operating system takes care of it.
|
|
|
|
|
Robert Rohde wrote: So just because a better threading lib exists in C one shouldn't use threading in .NET? Weird logic. I've used multithreading in dozens of situations in .NET and although it is not "aware" of the number of physical processors/cores it generally does a good job. Why? Because the operating system takes care of it.
Of course not. I was responding specifically in the context of counting threads based on the number of processors you have. That's pointless in .NET.
Yes, the OS will do some thread parallelization for you, but if you actively want to use those processors you have to use lower level languages with specialized libraries.
There's nothing wrong with threading, but you have to understand your problem and the limitations of various solutions before you start creating tons of threads thinking it will solve your problem, as Luc accurately points out.
The early bird who catches the worm works for someone who comes in late and owns the worm farm. -- Travis McGee
|
|
|
|
|
Patrick Sears wrote: I was responding specifically in the context of counting threads based on the number of processors you have. That's pointless in .NET.
Not totally. I agree that you cannot be 100% sure that if you run 4 threads in .NET that every thread will run on its own core (although it does it very often). Nevertheless you have a "hint" on how many parellel threads might be good. If you know you have only one core than you would normally not start several threads (assumming its only about number crunching).
But I agree with your other points.
Robert
|
|
|
|
|
Robert Rohde wrote: Not totally. I agree that you cannot be 100% sure that if you run 4 threads in .NET that every thread will run on its own core (although it does it very often). Nevertheless you have a "hint" on how many parellel threads might be good. If you know you have only one core than you would normally not start several threads (assumming its only about number crunching).
And I also agree with you there
The early bird who catches the worm works for someone who comes in late and owns the worm farm. -- Travis McGee
|
|
|
|
|
Patrick Sears wrote: but you have to understand your problem and the limitations of various solutions before you start
Sorry but that is counter the VB way of life. You "start" by dragging and dropping controls onto a form. All the rest of the development is insignificant overpaid typing.
|
|
|
|
|
led mike wrote: Sorry but that is counter the VB way of life. You "start" by dragging and dropping controls onto a form. All the rest of the development is insignificant overpaid typing.
Hehehe, touche'
The early bird who catches the worm works for someone who comes in late and owns the worm farm. -- Travis McGee
|
|
|
|
|
Hello everybody,
I have gone through lot many articles regarding the SOAP in webServices. I did many applications in the windows service in .net2005. Now my new requirement is to create a new windows service which can do two things: 1) it should be able to service a SOAP call by reading the MySQL db and generate a SOAP enevelpe. And 2) It should also run for every x-seconds/x-mins.
I am carrying out this task in C#.net2005. And MySQL.
Can anybody help me out in getting me the correct theory and code articles, because in my research.. i am getting deviated everytime.
So, please can anybody help me out..
Thanks in Advance
anumadhu
Anee
|
|
|
|
|
anumadhu wrote: 1) it should be able to service a SOAP call by reading the MySQL db and generate a SOAP enevelpe.
Can you break that out? Like:
1) Receive and parse a SOAP Request ( over what protocol)?
2) Query a MySQL database
3) Generate and send a SOAP Response ( over what protocol)?
|
|
|
|
|
Thanks Mike,
Task-1:
It should be able to do query and update MySQL database in backend for every x number of seconds.
Task-2:
And meanwhile, if it receives the SOAP request, it should do the following activities:
1) The windows service should be able to receive and parse a SOAP Request over HTTP protocol
2) Query and update a MySQL database
3) After updating the database, it should send a message(example: "Your Request Processed")as SOAP Response or SOAP Envelope over HTTP protocol.
Any related articles or the code samples in C#.net 2005, is of more help to me.
Thanks
Anee
|
|
|
|
|
|
It should also run for every x-seconds/x-mins.
you can create exe file and use
schedled task from os to run exe file every x-seconds/x-mins
|
|
|
|
|
WCF easily allows you to host a webservice from a Windows service.
Of course you can do it all yourself, but I can't think of any reason to do that.
EDIT: Hmm, now I see you wrote .Net 2005 which unfortunately doesn't really mean anything - I originally read it as VS2005 and replied based on this. If you mean .NET 2.0 then you have to do it yourself as is often the case when you try to do anything using outdated technology. If you mean VS2005, then simply install the CTP addons for VS2005 allowing you to program for .NET 3.0.
|
|
|
|
|
Hello,
I have been using VC++ for 3 yrs now.
Now I want to learn .NET Framework.
What is the actual purpose of .NET Framework and where should I start?
Regards,
Prithaa
|
|
|
|
|
The main purpose of .NET is to annoy the people at Sun.
C# is the best place for a C++ guy to start, there are books on starting C# from a C++ perspective.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
|
prithaa wrote: What is the actual purpose of .NET Framework
The primary purpose of the .net framework is to trivialize all the effort you put into learning C++. The secondary purpose is to trivialize your efforts to learn .Net by "managing" your code for you.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
|
You question doesn't make any sense since there is no such thing as a ".net connect". I take it you're really asking about how to grab images from a webcam in your .NET app.
Google for "WIA" or "Windoes Image Aquisition" for examples. You could even add the language you're using to the keywords, such as "C# WIA", or "VB.NET WIA" to narrow down the search a bit.
|
|
|
|
|
i use code on http://www.codeproject.com/dotnet/wiascriptingdotnet.asp
when i test with obicam on notebook. it can grab image
thank a lot
|
|
|
|
|
We have created a utility dll and associted the same with the strong name and deployed it in Global Assembly Cache (C:\Windows\Assembly) folder using gacutil.exe
Since I need this utility to be used by many applications running on this machine i pushed it to GAC.
But Im not able to reference this utility in any of the applications(By Using Add Reference).
Can anyone please help ?
Thanks in advance.
Prashanth Nandi
|
|
|
|
|
|
Thanks a lot Martin. Its working fine now.
|
|
|
|
|
Hi folks,
How the windows API differenciate Normal EXE'x from the .Net EXE's, for example when you click the .Net exe file then it should be load the CLR into memory and execute the exe otherwise it never load CLR to execute. If any one knows please share with me.
Advance Thanks,
friendly,
ranandbe
|
|
|
|
|
ranandbe wrote: How the windows API differenciate Normal EXE'x from the .Net EXE's, for example when you click the .Net exe file then it should be load the CLR into memory and execute the exe otherwise it never load CLR to execute. If any one knows please share with me.
A .NET executable contains a special CLR Header, which is only available in .NET executables. The PE (portable executable) header will redirect the OS to this section. It's worthwhile getting to know how the PE format is used and what it does.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Thank You. After you say that i go and open the EXE with ILDASM utility.
It Shows the following at the program entry point.
.method private hidebysig static void Main() cil managed
{
.entrypoint
.custom instance void [mscorlib]System.STAThreadAttribute::.ctor() = ( 01 00 00 00 )
// Code size 26 (0x1a)
.maxstack 8
IL_0000: nop
IL_0001: call void [System.Windows.Forms]System.Windows.Forms.Application::EnableVisualStyles()
IL_0006: nop
IL_0007: ldc.i4.0
IL_0008: call void [System.Windows.Forms]
******************************
} // end of method Program::Main
What it tells?
friendly,
ranandbe
|
|
|
|