|
Wll Im not exactly sure but here are my thoughts:
A delegate is some kind of pointer to a specific function. If your serialize an object with a delegate to anothers object function the reference to this object will be missing in the other context where you try to deserialize it.
The question is what you think how those delegates should behave on the remote location. Should invoking these delegates invoke functions on the original machine? If yes I think you are in trouble (I dont think that will work with the default remoting mechanisms in .NET). If they are not needed just mark them with the appropriate attribute (dont know the exact name) and their values will be left null.
|
|
|
|
|
Guten Morgen Robert!!!
Wie gehts' :P .... well it means i have to send my dll to remote machine ... is there no other way u can tell me ??? ..... and 1 thing more u talked abt default remoting mechanism ... then what have i to do in this regard so it works ??? ..... Looking forward for ur reply
Auf Weidersehen!
|
|
|
|
|
If even one of the targets of your delegate are not serializable the entire serialization will fail.
Delegates can be serialized as long as the methods they point to are contained within classes that are serializable too. This way the type information of the classes and methods required is still accessible upon deserialization. As long as this data is available the correct class type can be located, instantiated, and then finally have the correct method called.
Make sure your client machine also has access to the metadata of your remoted object (including the metadata of the delegate targets). If any of this metadata is not available, the deserialization will fail.
This space for rent!
My Blog
|
|
|
|
|
Hello,
I am using the generic TreeView Control from .Net 2002.
I want to have the root nodes of the control to have a bold font and I thought this could be easily done by setting the NodeFont attribute of the node.
However, when I do this the font is indeed bold but it seems that the control does not resize the text box the node text is drawn in and the text gets clipped (I assume becase the new bold font is wider than the previously assigned text which isn't bold by default).
Does anybody know what I can do to fix this.
Sample of code below:
TreeView treeView = new TreeView();
...
TreeNode tn = new TreeNode("Test");
tn.NodeFont = new Font(treeView.Font, FontStyle.Bold);
...
Thank you in advance,
Eric
|
|
|
|
|
I am using Trace in order to log information about the behavior of a web
application. In web.config I have defined my Application Listener as
following:
<trace autoflush="true" indentsize="4"> <listeners> <add name="AppListener"
type="System.Diagnostics.TextWriterTraceListener"
initializedata="d:\temp\activity.log">
<remove type="System.Diagnostics.DefaultTraceListener">
As you can see all activity is logged in "d:\temp\activity.log". Is there a
way to make this variable, that is changing by date automatically, such as:
activity20041201.log,
activity20041202.log,
activity20041203.log etc.
Thank you for your time
Spiros Prantalos
Miami the place to be!!
|
|
|
|
|
I dont think this is possible via the .config. But you could configure the tracing from your own code, e.g.:
System.Diagnostics.Trace.Listeners.Add(new System.Diagnostics.TextWriterTraceListener("activity" + DateTime.Now.ToShortDateString() + ".log"));
|
|
|
|
|
I have a question regarding Visual Studio 2003 .net. Does it support the compact .NET framework, and if it does, how do i enable it. And finally, which project type do i have to use.
regards zagzagzag
|
|
|
|
|
Yes it does. You dont have to enable it seperatly. I thin kwith the default installation options everything you need is installed.
The project you have to create is called "Application for smart devices" (or something similar - Im using the german version). It has a symbol for a handy and a pokect pc nearby.
I will let you select for which type of smart device you want to create the project and will even show you the appropiate emulator when you start the project in the debugger. It is even possible to debug the application on a connected pocket pc.
|
|
|
|
|
Okay.. thanks for the reply.!
i have found the project template!
Greetings...
And a happy newyear!
|
|
|
|
|
hi,
The article on "Exposing .NET component to a COM client" was useful to me.
But still I have some queries.
I in a situation where I am constrained to expose only certain predefined interfaces to the COM Client.The interfaces that I am supposed to expose to the client are defined by a third party through an IDL file.Is it possible for me to implement those interfaces using .NET frame work and expose my .NET components to the client?
I'll be happy if u give a quick reply.
THanks,
Harish
harishmurali
|
|
|
|
|
Hi!
Where can I get the Microsoft Windows .NET DDK?
Thanks!
|
|
|
|
|
How can i run a process in background in .net framework?
Is there any way to assure that ur exe gets closed last when system is shut down?
Does "Running process in background" solve this problem?
|
|
|
|
|
|
I am a MSMQ novice, start reading about it a couple of weeks back and got a little confused on what is the best way of using it in my scenario, looking for suggestions.
I have a server application that send/recieve messages from/to different client applications. Each client has a certain type. During the provisioning phase server gets the knowledge of what type of message will be routed to what type of clients. For example message type A coming from client of type B will need to be routed to clients of type C whereas type D message will have to be routed to clients of type E. Currently this messaging is done via a common database but for the next Gen solution we are considering to take advantage of Microsoft messaging APIs. Here is what I have in mind and related questions.
The server application will have two queues, one for incoming messages and other for outgoing message. Clients can just send their messages on the incoming queue. Server processes the message coming in incoming queue and publishes them on the outgoing queue. The clients will keep polling for the outgoing queue on the server looking for any messages of their interest (polling is probably not a very good idea though). If they find a message appropriate for them, they will process it and do whatever needed. In this scenario seems to me that we will not have to have MSMQ component installed on the client machines (which might be useful for some of my needs). Client apps can access the queues and send/receive messages via System.Messaging API. In some cases these client app will be running on laptops that may not have connectivity all the time. So for these scenarios seems to me that may be I should consider MSMQ independent client that does require to have MSMQ installed on the client machine. But I am little confused how does this mode works. Will client applications be sending/receiving message to the local queue? If this is the case then how does the transfer of messages between local queue and queue on the server works? Will I have to write another application to do this?
Thanks in advance for you guys help.
|
|
|
|
|
I am trying pass a .NET function pointer to a COM component so the COM component can call the function as a callback method. I am using the Marshal.GetFunctionPointerForDelegate method to get the pointer but am having trouble declaring the COM method in my IDL file. Here is my C# code:
<code>
// Create delegate
RcvDataDelegate pd = new RcvDataDelegate(RcvData);
// Get function pointer that can be passed to COM component
IntPtr fpCallback = Marshal.GetFunctionPointerForDelegate(pd);
// Register function with DataManager COM component for callback
m_DataManager.RegisterSendDataDelegate(fpCallback);
</code>
IDL:
<code>
[id(7), helpstring("method Send Data Callback")] HRESULT RegisterSendDataDelegate(
[in] IUnknown* pSendDataDelegate);
</code>
The documentation says to declare the function pointer as void * but the MIDL compiler doesn't accept that.
|
|
|
|
|
Hi.
I need to do the following:
Attach to aspnet process immidiately after it is created (and before it does anything), and inject a DLL into the process.
The DLL uses hooks for memory allocations, and so - HAS to be activated before aspnet allocates any memory.
Does anyone have an idea how this can be done?
injecting the DLL is no problem, but i need to do that exactly after the process has been created.
Thanks.
|
|
|
|
|
Can any one here please help me to know how to write Plugins for Internet Explorer using .NET.
|
|
|
|
|
and to download a file from a remote web server to a specific directory in a local windows directory? I know it is possible to use the System.FileInfo and System.DirectoryInfo classes, but these classes do not work with "http://".
Could it be done by integrating a simple web .html page with an onLoad event, and if so, how could the web page be opened in HIDDEN mode?
I would really appreciate some insight into this issue.
! ! ! !
|
|
|
|
|
I am new to programming of all sorts. I need a little help in finding a problem in my code. I am trying to retrieve some NEMA(text stream) data from a server by creating a socket then sending a query. The console application works but I am not receiving all of the data string from the server. I have used some other “Canned” applications that basically do the same thing and they display the entire string after I send the query. I will enclose my code. Please keep in mind that my knowledge is very, very little. Any suggestions would greatly be appreciated.
____________________________________________________________________________
Imports System.Text
Imports System.IO
Module Module1
Sub Main()
Dim bytes(8095) As Byte
Dim ipHostInfo As IPHostEntry = Dns.Resolve("www.XXXXXXX.com")
Dim ipAddress As IPAddress = ipHostInfo.AddressList(0)
Dim remoteEP As New IPEndPoint(ipAddress, XXXX)
' Create a TCP/IP socket.
Dim sender As New Socket(AddressFamily.InterNetwork, _
SocketType.Stream, ProtocolType.Tcp)
' Connect the socket to the remote endpoint. Catch any errors.
' Try
sender.Connect(remoteEP)
Console.WriteLine("Socket connected to {0}", sender.RemoteEndPoint.ToString())
' Encode the data string into a byte array.
Dim msg As Byte() = Encoding.ASCII.GetBytes("XXX vehicle ghist:X.XXX.X.XXX,000000,11/01/2004,000000,12/10/2004,eof" & vbCrLf)
' Send the data through the socket.
Dim bytesSent As String = sender.Send(msg)
' Receive the response from the remote device.
Dim bytesRec As Integer = sender.Receive(bytes)
Console.WriteLine(Encoding.ASCII.GetString(bytes, 0, bytesRec))
sender.Shutdown(SocketShutdown.Both)
sender.Close()
Console.Read()
End Sub
End Module
|
|
|
|
|
Hi,
I am currently working with VS .NET 2003 Enterprise.
I got the new CD's from Microsoft containing VS 2005 BETA a couple of months ago and would like to start using them (I develop using ADO .NET,C# .NET,VC++,MFC,VB .NET ,pocket pc, and ASP .NET so these are the ones I'm most interested in my questions).
I have a few questions regarding the VS 2005 beta:
1.Is it possible to install it on the same PC with VS .NET 2003 or should I uninstall VS .NET 2003 first?
2.Can I open and compile all C#,VB,C++ MFC projects that where created and used with VS .NET 2003 on the VS 2005 BETA with no problems?
3.Why is it called VS 2005 and not VS .NET 2005?
4.when is the VS 2005 release version expected?
5.What are the general improvements to VS 2005 BETA compare to VS .NET 2003?
6.What is the download from the Microsoft MSDN Subscriber Downloads site for the VS 2005 BETA, which is equivalent to VS .NET 2003 Enterprise developer?
Thanks in advance for the response.
Aviv.
avivhal
|
|
|
|
|
Hey Aviv..
I think i can help yo with some of your questions.
1. I Succesfully installed the 2005 C++ demo, alon with Visual Studio 2003 .NET pro
2. I have succesfully opend some projects from this site in 2005 VB edition, they have created some kind of project converter. BUT when the project is converted, you wont be able to open it in the older versions of .NET
4. They are expecting to release it in the first half calender year of 2005.
hope you find this useful
|
|
|
|
|
Thanks for the reply.
I dug a bit info from the msdn, and didn’t find any significant changes ( apart from when the new window OS version will be released...)
I think I'll wait for the release.
Thanks again.
Aviv.
avivhal
|
|
|
|
|
Answers to some of the questions that are yet unanswered:
3. Because the .NET moniker has become a bit of an embarasment for Microsoft (101 different unrelated things got labeled as such-and-such.NET meaning nobody was really sure what ".NET" actually meant anymore)(
5. One big improvement is the introduction of version 2.0 of the .NET framework, which adds lots of extra stuff - have a look here[^] for lots of info
6. There's a download link for the beta in the link above
--
Help me! I'm turning into a grapefruit!
Phoenix Paint - back from DPaint's ashes!
|
|
|
|
|
Hello Friends,
I want to learn .Net. I had good experience of VC++6.0 and want to migrate to .Net. So plesase suggest me the way to learn .Net and from where I can get good basic learning material on the net.
Thanks in advance.
Neelesh K J Jain.
|
|
|
|
|
well, I've learnt basics of .NET from MSDN[^] and with help of my friends. Here (CP) you have potencially milion and half friends willing to help u and some tutorials... search articles.
Bt at first, try to figure out by yourself - too many questions are answered by simple googling or searching MSDN docs. Save us some time plz
I can't recommend you other developer sites, cuz I don't usually visit them (codeguru, gotdotnet, csharpcorner etc.) Bt that says nothing about their quality - it is all about me
ah and I don't have to tell u that studying examples and experimenting with them is damn good way how to learn, do I?
hope I gave u some clues... and you can buy some books (again, I didn't do that ).
best regards,
David 'DNH' Nohejl
Never forget: "Stay kul and happy" (I.A.)
|
|
|
|