Eric_Sun's Q&A profile
Visual Studio 2008 (Pre-release) Maximizing throughput with streaming
Hi All, I'm trying to learn about WCF while solving a problem I have right now but need a little help on the performance side. I have a remote filesystem with about 1000 directories, containing anywhere from 1 to 1500 files each. File sizes range from 300KB to 3MB each. I need to mirror the remote filesystem locally over a VPN connection. So, I've created a client server using WCF, net tcp binding and streaming. It's all functional now but the throughput is very bad. The pipe for the VPN connection is enormous, with over 300Mbps available, but the latency is pretty high. I do know that my files aren't large enough to require streamed transfer rather than buffered but I'm practicing for another problem ...Show All
Visual Studio Team System Delete a shelveset
How do i delete a shelveset programmatically Regards Guru See the VersionControlServer.DeleteShelveset methods:- http://msdn2.microsoft.com/en-us/library/microsoft.teamfoundation.versioncontrol.client.versioncontrolserver.deleteshelveset(VS.80).aspx ...Show All
Visual Studio 2008 (Pre-release) Bitmaps & the Adorner layer
I have wired up an MFC app to display a WPF panel as a view using the HwndSource mechanism. It all works fine, except nothing on the adorner layer (which I use extensively) is visible. Is this a limitation of the integration technique or is there some way I can see adorners Thanks, Jeremy My initial thought is that adorner is drawn on a seperate drawing surface, so you should render the adorned visual and adorner visual seperately into RenderTargetBitmap. Sheva ...Show All
Visual C# Passing an inherited class as 'T' to a generic container.
I'm having trouble finding out how to use a general purpose generic container I wrote as a member of another class which wants to hold any class type based on a common base class. The first set of code below shows 4 seperate classes, RNode is a generic class, TreeControl has an RNode<TreeItemBase> member, and a "Root" property to access it, TreeItemBase is a control (not really important to this), and TreeItemHeader is derived from TreeIItemBase... Public class RNode<T> {} public partial class TreeControl : ScrollableControl { private RNode<TreeItemBase> root = null; public RNode<TreeItemBase> Root { get { return root; } set { root = value; } } } publ ...Show All
Visual C# How to update a DataRow ?
I have a DataTable with a Primary Key field. When necessary I use DataRow row1 = table1 .Rows.Find ( primaryKeyValue ) command to find the row I need. Then I plan to change some values in the row row1 . My question is: row1 is a separate object but I need the changes to occur at a certain moment in time in the table1 . I cannot figure out how I can do it in one command. A time losing way would be to put the table through a loop, find the row I need and make the changes in the table directly. If I do it I won't need the Primary key and I won't have the row1 extracted. So, if you understand my dilemma, please suggest how it can be done. i am sure there should be a way to do it. Many thanks. Andrej Tozon wrote: Not ...Show All
Windows Forms Modeless Dialog boxes that are Always in Focus
How do you make a modeless dialog box so that it is always in focus with the parent window Like the floating menus in Photoshop, for example. Whatever I do, I haven't found a way to keep more than one window in focus at a time. I'm looking at a similar problem without success too. I want floating toolbars/forms like Paint .NET uses (these stay in focus with the main window and can leave the main window area) Correction: the main window in Paint .NET appears not to lose focus when you click on a toolbar - The titlebar remains dark - I am unable to see how they achieve this as yet as if I AddOwnedForm to my main Form, then clicking on that child form takes away focus visibly from the main win ...Show All
.NET Development Serializing Static Classes
Hi. Firstly, and most importantly, any valuable answer I recieve is appreciated however it must be best practice and the Microsoft way of doing things :-) I have an application. It has "ApplicationSettings" which is a static class. (only 1 can ever exist) There is also another class called "MouseManager", this is also static. ApplicationSettings has a reference/property to MouseManager. How can I serialize MouseManager (and any other classes as a property) and 1 other property of ApplicationSettings so.... public static TheMouseManager { get { return theMouseManager; } } //want this class to be serialized public static SomeClass { get { return theSome ...Show All
Visual C++ how to hide cmd (command | dos) window...
. i am using system() function to run comands/apps and collect the return value. now, whenever i call system() function, a command(dos) window is being popped up and remains on screen untill the system() function returns. Any ideas / methods to hide this dos window while running system() You can call WaitForSingleObject on the handle returned by CreateProcess (via a handle in the ProcessInfo struct ). Here's one example (you'll need to ignore the HTML junk ). http://www.adp-gmbh.ch/win/misc/create_process.html ...Show All
Windows Forms How do I Open a new form from a button click event?
I am trying to teach myself how to use windows form and I am currently stuck with not being able to have a new form opened by the clicking of a button. Currently I have an Intro.h form with a button Labeled 'Continue' on it. I want it to open a new form called menu1.h I am fairly familiar with C++, so any advice that is language specific would be most helpful in C++ Thanks for any advice Hi, add a new event handler for the onclick in the button (in the designer you can just double click the button "Continue") and it will create the handler for you. In that method you put the code to create the form: Menu1^ menu1 = gcnew Menu1(); menu1->Show(); ...Show All
.NET Development Recieving error when using XmlSerializer
Below is the code I am using. ** My Item.CS class that contains the methods and variables used by most of the items. public class Item { private int mItemCost = 0; private int mItemResell = 0; public int ItemCost { get { return mItemCost; } set { mItemCost = value ; } } public int ItemResellValue { get { return mItemResell; } set { mItemResell = value ; } } public void Save( string filePath) { if (!filePath.EndsWith( "\\" )) filePath += "\\" ; System.IO. Stream stream = File .Create(filePath + ItemFilename); XmlSerializer serializer = new XmlSerializer ( typeof ( It ...Show All
Microsoft ISV Community Center Forums MS Office document and image writer print driver
Besides removing this feature from Office during setup, is there a process to remove this virtual printer from 300 users with roaming profiles on an active directory network We are having an issue with this printer assuming the "default printer" selection for our users. As a work around we have changed their default printer, but after they reboot or log off / on it has defaulted back to the MS Ofc doc and image writer printer. 1. Go to Control panel – Printer and fax 2. Add Printer – select local printer attached then manual 3. In the port option select Document image printer writer port 4. Install a generic text only printer. 5. Right-click on the generic text/only printer driver and select prope ...Show All
Game Technologies: DirectX, XNA, XACT, etc. GameTime
Is there a reason that gameTime.ElapsedRealTime.TotalSeconds and gameTime.ElapsedGameTime.TotalSeconds is never greater than 0.5 This appears to be the case no matter how long I wait between updates during debug. This is because in the internal workings of the XNA Framework, there's a private internal variable for the maximum elapsed time that can happen between updates. If the ElapsedGameTime or the ElapsedRealTime is greater than 500 milliseconds, then those variables are just set to 500 milliseconds. This is pretty common so that when you are debugging code in your game, when you resume your time based movement hasn't moved the character beyond the realms of your screen. Hope that clears up the myste ...Show All
SQL Server Query RowVersion in SQL Server 2005
Hello all, I am new at SQL Server 2005 and have been reading everything I canfind about the new optimistic concurrency control mechanisms. As far as I can tell, the Snapshot Isolation Level is based avoids the use of shared locks using rowversioning instead. To control rowversions in SQL Server 2000 I was using an extra column in each table containing a rowversion datatype. Is it possible in SQL Server 2005 to avoid the use of this extra column What I mean is, if the Snapshot Isolation already manages rowversions in TempDB, is it possible for me to query those versions using some stored procedures or functions given by SQL Server 2005 system What functionalities does SQL Server 2005 gives me for that (any documentation pointer ...Show All
Visual C++ Copying a module
Hi guys I would like to copy a process's module. This is how the scenario looks: Lets say that there is a process called "Main.exe" and it loads plenty of modules and 2 of the modules that it loads are: 1. "Copyer" 2. "Checker" Now i want to somehow modify something in the module called "Copyer" but if i do that then Checker(which scans this module once in a while) will find out that i have changed something and then exit. So what i have come up with is that i have to somehow copy the Copyer module and then inject it in Main.exe then make this Checker to somehow scan that copyed/injected module instead of the original Copyer module. Could someone please help me to figure out a way to copy a module and make this Checker scan the copie ...Show All
SQL Server Export sql data to text file
Hi all, I am new to ssis. I try to create a package completely by vb.net to export a table in sql server to text file. i got the following error while i run the package, An OLE DB error has occurred. Error code: 0x80004005. An OLE DB record is available. Source: "Microsoft OLE DB Provider for ODBC Drivers" Hresult: 0x80004005 Description: "[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified". The AcquireConnection method call to the connection manager "OLEDBSrc" failed with error code 0xC0202009. component "OLE DB Source" (1) failed validation and returned error code 0xC020801C. One or more component failed validation. There were errors during task val ...Show All
