|
Thanks for the info. What I don't understand is:
* Why would this type of event be slower?
MSDN says: "Note that event properties are slower than event fields, as each event delegate has to be retrieved before it can be invoked. "
But wouldn't the cost of retrieval be minimal?
* Would I be able to handle the invoking of the delegates myself? Since I have access to each delegate, this shouldn't be too hard.
* In order to do what I'm wanting to do, I would have to call each of the delegates separately, rather than combining them and calling them together. What are the performance costs of this?
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi
|
|
|
|
|
jdunlap wrote:
Why would this type of event be slower?
Too small to notice
jdunlap wrote:
Would I be able to handle the invoking of the delegates myself? Since I have access to each delegate, this shouldn't be too hard.
No problems here either
jdunlap wrote:
In order to do what I'm wanting to do, I would have to call each of the delegates separately, rather than combining them and calling them together. What are the performance costs of this?
Multicast delegates are stored as a linked list. By defining a property, one can use a different container such as a hashtable, array, arraylist or some other ingenious datasource (SQL/XML).
leppie::AllocCPArticle("Zee blog"); Seen on my Campus BBS: Linux is free...coz no-one wants to pay for it.
|
|
|
|
|
OK, thanks for the info!
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi
|
|
|
|
|
How can I make my project (which result is .exe file) to be a screen saver (I think extension is .scr) ???
|
|
|
|
|
|
Can anyone tell me what is different about c# compared to visual c++ 6 and does the c# enviornment use the .net framework... if so what are some disadvantages and advantages to it + I'm new to c# and wondered will it be the future of visual c++ 6 and maybe replace mfc?? Please I would appreciate any responses.
<marquee>Universal Project... Soon to be a .net
|
|
|
|
|
Snyp wrote:
what is different about c# compared to visual c++ 6
One is a .NET language, the other a development tool which uses Microsoft's C+ compiler and has support for MFC.
Snyp wrote:
does the c# enviornment use the .net framework
Yes, of course. C# is a .NET language.
Snyp wrote:
what are some disadvantages and advantages to it
Some advantages of C#:
- syntactically very similar to C/C++/Java.
- simpler than C/C++ -- no need to deal with pointers and memory management.
- code written in C# can be used and extended by other .NET languages.
- has a few features not found in C/C++/Java, such as Properties.
Some disadvantages of C#:
- Some C++ features, such as multiple inheritance, default parameters, preprocessor macros, and templates (which are coming soon) are not there.
- Garbage collection scheme may not be suitable for some real-time, performance critical apps.
I hope to have shed some light on your doubts. Several people have brought up this issue in other forums, such as the Lounge. I recommend you do a Search on the topic to help you decide your direction.
Regards,
Alvaro
Hey! It compiles! Ship it.
|
|
|
|
|
Definition from MSDN for interactive processes:
"Interactive Processes
- A service that can communicate with the desktop."
Does that mean if a "Win32OwnProcess" or a "Win32SharedProcess" is not an "InteractiveProcess", some sort of mechanism prevents that process from interacting with Desktop.
I just wrapped up some code in Windows Services - didn't configure it specifically as interactive process, but when I query ServiceController object, it tells me that it's an Interactive Win32OwnProcess. My service does nothing more than listening on a Tcp port and spits out a block of byte in return when connection is accepted. Any client can interact with desktop in response to the byte sent out by my Windows Service. Is that what makes it "Interactive"?
Thanks.
|
|
|
|
|
Hi !
Can anybody please help me?!
I have an object which holds a System.Timers.Timer .
Unfortunately the GC doesn't collect the Object when the timer is running.
any ideas what I can do?!?
thanks.
andi
|
|
|
|
|
|
oh.... nope.
thank you.
andi
|
|
|
|
|
Hi , im trying to use MS Script Control (com) in my app.
it works wonderful but when a script has a syntax error , windows either shows a msgbox or a "do you wish to debug the script blabla"
is there ANY way to turn off this feature (i want to turn it off for my app ONLY , not for entire windows)
any ideas?
if this is impossible , does anyone know of any good VSA samples?
can i use VSA to evaluate expressions the same way as the scriptcontrol? (i only need to evaluate a expression ,no methods/functions or anything)
//Roger
|
|
|
|
|
|
i solved it.
i use jscript.net now instead.
very cool stuff
//Roger
|
|
|
|
|
Hi.
I'm currently working on a deployment package for a .NET Windows Application. The application use Windows Media Player 9 to pre-view media content. I've read trough many of the articles on MSDN about redistributing WMP with your applications, but most of the examples on how to do this code-vice is in C++. We allso found documentation on how to run the setup.exe file with command line switches to install it in silent mode (no gui for the user, it just gets installed).
Our application allso need MDAC 2.8 to run, so we're deploying that as well. Deploying MDAC was a charm, since we found a pre-made merge module we could include in our MSI.
So, question 1: Anyone know if there exist a merge module for WMP9?
If we don't find a merge module for WMP9, we'll have to go for the commandline install in silent mode. The problem is that in our installer class, that is inheriting System.Configuration.Install.Installer, we cant "find" the file. Caouse, once the MSI installer kicks in, then current path is set to c:\windows\system32. I'm 99% sure that the reason is that once the MSI runs, it starts the MSI runtime that's in the system32 folder.
So, question 2: How can i find files inside the MSI / find out where the MSI is started?
My third alternative is to write a setup boot strapper .exe that starts the MSI. Since our app is a .NET windows application, the computer need the .NET framework installed. Therefore we need to write a Delphi/C++/VB6 app to check if the .NET framework is installed, and if not install .NET before launching our MSI. We could check for WMP9 after checking for .NET.
And, some might wonder if you're allowed to redistribute WMP. The answer is yes, if you gain a redistributing licence from MS...
Hope some one could give me a few pointers on how to solve this problem.
Best regards,
Jonas Follesø
|
|
|
|
|
Jonas Follesø wrote:
So, question 2: How can i find files inside the MSI / find out where the MSI is started?
You can use GetModuleFileName() unmanaged API which return the path of current process. I think .NET must have something like this too but I don't have MSDN installed on this machine and my connection is too slow to check online MSDN.
For your third question I think when you create setup for your C# project and you add Installer class to it, this setup need .NET framework to run itself so I don't think you can check it inside the setup.
Mazy
No sig. available now.
|
|
|
|
|
I'd recommend you leave windows media player and in turn use Managed DirectX9 for playing your Audio and Videos.
In this case, you do not need to do anything special when deploying your project. The interesting thing is that the target machine doesn't need DirectX9 installed, any installed version of DirectX is acceptable(at least I remember that directX 7 was enough)
Don't forget, that's Persian Gulf not Arabian gulf!
|
|
|
|
|
I create a htm file for my helprovider class and asossiate this file to HelpNamespace,now my question is what actually happend when I use SetHelpNavigator() method,I use different properties for its second parameter but nothing happend.Can somebody give some point about it?
Thanks
Mazy
No sig. available now.
|
|
|
|
|
I am currently developing a remoting object for my wbsite (www.play47.net) and am experiencing the following problem. If you have any ideas, they would be greatly appreciated...
The remoting object has the following method:
public void MailQueueItemsSet(MailQueueItem job)
This returns a custom object which I have defined back to the DB (ie deletes / updates and needed).
This object (MailQueueItem) has the following definition:
[Serializable()]
public class MailQueueItem : DataItem, ISerializable
Now, from my client application I call the following method:
coordination.MailQueueItemsSet(job);
And receive this exception:
System.Runtime.Serialization.SerializationException: Because of security restrictions, the type play47.mail.RemotingInterfaces.MailQueueItem cannot be accessed. ---> System.Security.SecurityException: Request failed.
at System.Security.SecurityRuntime.FrameDescSetHelper(FrameSecurityDescriptor secDesc, PermissionSet demandSet, PermissionSet& alteredDemandSet)
at System.Runtime.Serialization.FormatterServices.nativeGetSafeUninitializedObject(RuntimeType type)
at System.Runtime.Serialization.FormatterServices.GetSafeUninitializedObject(Type type)
--- End of inner exception stack trace ---
Server stack trace:
at System.Runtime.Serialization.FormatterServices.GetSafeUninitializedObject(Type type)
at System.Runtime.Serialization.Formatters.Binary.ObjectReader.ParseObject(ParseRecord pr)
at System.Runtime.Serialization.Formatters.Binary.ObjectReader.Parse(ParseRecord pr)
at System.Runtime.Serialization.Formatters.Binary.__BinaryParser.ReadObjectWithMapTyped(BinaryObjectWithMapTyped record)
at System.Runtime.Serialization.Formatters.Binary.__BinaryParser.ReadObjectWithMapTyped(BinaryHeaderEnum binaryHeaderEnum)
at System.Runtime.Serialization.Formatters.Binary.__BinaryParser.Run()
at System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler handler, __BinaryParser serParser, Boolean fCheck, IMethodCallMessage methodCallMessage)
at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, IMethodCallMessage methodCallMessage)
at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.UnsafeDeserialize(Stream serializationStream, HeaderHandler handler)
at System.Runtime.Remoting.Channels.CoreChannel.DeserializeBinaryRequestMessage(String objectUri, Stream inputStream, Boolean bStrictBinding, TypeFilterLevel securityLevel)
at System.Runtime.Remoting.Channels.BinaryServerFormatterSink.ProcessMessage(IServerChannelSinkStack sinkStack, IMessage requestMsg, ITransportHeaders requestHeaders, Stream requestStream, IMessage& responseMsg, ITransportHeaders& responseHeaders, Stream& responseStream)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at play47.mail.RemotingInterfaces.CoordinationServer.MailQueueItemsSet(MailQueueItem job)
at play47.mail.SMTPClient.SMTPClient.DoJob(MailQueueItem job) in C:\Inetpub\wwwroot\play47\SMTPClient\SMTPClient.cs:line 257
at play47.mail.SMTPClient.SMTPClient.DoWork() in C:\Inetpub\wwwroot\play47\SMTPClient\SMTPClient.cs:line 132
If you have any ideas regarding this problem they would be greatly appreciated...
Tatham Oddie (VB.NET/C#/ASP.NET/VB6/ASP/JavaScript)
tatham@e-oddie.com
+61 414 275 989
|
|
|
|
|
Have you added the remoting object to your web config under the well known objects? If not then the .Net security will not let you use the object. I think there are a few examples of how to set up Remoting on CP. Just search for Remoting and you will find some good articles on how to set up and use remoting.
See:
http://www.codeproject.com/useritems/iishostedremoting.asp?target=remoting
|
|
|
|
|
Ok, I thought you only had to include it in the config to get an instance, then from there on it just got whatever objects it needed.
Thanks for your help... Most appreciated - it works now!
Tatham Oddie (VB.NET/C#/ASP.NET/VB6/ASP/JavaScript)
tatham@e-oddie.com
+61 414 275 989
|
|
|
|
|
I want to learn about snmp soure code with c#,where can find it?
|
|
|
|
|
Can someone convince me to crossover from visual c++ 6 to c#. What's so good in it anywhy, does it have a future of some sort, or is it like basic and qbasic other than the difference in name...
<marquee>Universal Project... Soon to be a .net
|
|
|
|
|
nobody can convince you...
If you are interested in C# go and read a few articles or a book...
Then think for yourself and tell us what you think about it...
theJazzyBrain
Wise is he who asks good questions, not he who gives good answers
|
|
|
|
|
One is new, simple, and has a promising future. The other is old, complex, and has a questionable future.
Regards,
Alvaro
Hey! It compiles! Ship it.
|
|
|
|