Hello ! When an object is marshalled by ref (through .net remote client call), all references it hold also get marshalled too--except those new inside itself. Is this the correct statement? Technically, class MyService : MarshalByRefObject { MyObject myObj = new MyObject(); // stay native MyObject hisObj = someOneElse.Object; // become TransparentProxy ... }
Thanks, sovann
s o v a n n
Posts
-
marshalling mechanism -
.net remoting proxyHello! I am having a problem with .net remoting. I have searched Microsoft documents, but got no hints. When the server is accessed by remote client, it turns to be proxy : OK All instances new inside the server class stay native--direct call : OK All references passed to the server class turns to be TransparentProxy : Why ? Is it because the reference is outside the server object memory segment ? But they are in the same app domain--real object out there. Technically,
class Server : MarshalByRefObject { ListBox myList = new ListBox(); // stay native--direct call ListBox hisList; // turns to TransparentProxy public Server(ListBox list) { hisList=list; ... // open port, listen to client request } } class MyForm : System.Windows.Form { public MyForm() { ... new Server(listBox); // start the server } }
Your comments would be very helpful. Thanks. Sovann -
Do we need to call dbCommand.Dispose() ?Thank you. Your comment has been very helpful :)
-
Do we need to call dbCommand.Dispose() ?Thank you. Anyway, do we have to call IDbCommand.Dispose ?
-
Do we need to call dbCommand.Dispose() ?Hello ! I have a question about DB specifications : Do we have to call IDbCommand.Dispose ? What does IDbCommand.Dispose mean? We have problem doing this :
IDbConnction pipe = new OleDbConnection(connString); IDbCommand command = pipe.CreateCommand(); command.QueryString = "select ..."; IDataReader reader = command.ExecuteReader(); **command.Dispose();** reader.Close(); pipe.Close();
The problem get solved if we don't do IDbCommand.Dispose Your comments would be very helpful. Thanks. Sovann -
GraphicsState and hardwareHello! How many GraphicsState can we save. Does it depend on hardware capability? If so, how to get that stack size?
GraphicsState state1 = g.Save(); GraphicsState state2 = g.Save(); GraphicsState state3 = g.Save(); ... g.Restore(state3); g.Restore(state2); g.Restore(state1);
] Thank you. Sovann -
top most modeless dialogHello, Thank you for your advice. I have tried them all but 1. BringToFront() didn't solve the problem 2. set_Parent always complain 'cannot add top level control to this control' I tried : Dialog dialog = new Dialog(); // TopMost=false dialog.Parent = mainForm; // set parent to main form dialog.Show(); // run modeless Sovann
-
top most modeless dialogHello ! Is there a way to make modeless dialog top most/always visible without using TopMost=true ? Because if we click button to show modal from this modeless dialog, they always stay at back. Thank you. Sovann
-
are we 'printing' or 'previewing' ?Hello! To my knowledge, .NET call the same code for print and preview. Is there a way to distinguish between 'printing' and 'previewing' ? Thank you. Sovann
-
CTreeCtrl end label edit howtoHello ! I tried the following in CTreeCtrl to force label edit to end when we press VK_RETURN :
GetEditControl()->ShowWindow(SW_HIDE);
but I got AssertValid failed. Is there a nother way to do so? Thanks. Sovann -
desktop dpiHello! Is there a way to get the desktop dpi in c# ? I have searched the web, but got no significant informations. Thanks, Sovann
-
Get printer DC given printer name & paper sizeThank you very much for your comments. It really works :) Sovann.
-
Get printer DC given printer name & paper sizeHello! Suppose that we have a list of printer names and papers in CComboBox. Is there a way to get the printer DC from these info or technically :
CDC* getPrinter(LPCTSTR printerName, LPCTSTR paper, int landscape=1);
Your comments & ideas are really helpful. Thanks :) -
how to resolve overlapped regionMy appology for posting to two forums. The problems is: overlapped label inside a densed polygon on map. Each polygon has a label (ex. town name). The label should be placed to ensure readability while still reside in that polygon. Your comments woulds be very helpful.
-
how to resolve overlapped-regionHello! On the graph display we have many overlapped text. Is there any good algorithms to resolve this problem, so that we have a readable layout ? Thanks :)
-
how to resolve overlapped regionHello! On the graph display we have many overlapped text. Is there any good algorithms to resolve this problem, so that we have a readable layout ? Thanks :)
-
resolve crossed-bounds textHello! I am searching for a way to rearrange crossed-bounds text so that they don't appear on eachother. Your informations would be very helpful. :)
-
crossing bounds rearrangementHello! I am searching for a way to rearrange crossed-bounds text so that they don't appear on eachother. Your informations would be very helpful. :)
-
STL or <afxtempl.h>Thank you very much for your comments. I have read them all. My problem was direct access to STL object in other module. Now I am working on it. Thanks again. Have a nice day! :)
-
STL or <afxtempl.h>Thank you for your comments. I would reconsider the memory management. Sovann.