aschaeffer's Q&A profile
Visual C++ fatal error LNK1241: resource file foo.res already specified
I've been having random C++ incremental build issues that revolve around getting the error: fatal error LNK1241: resource file foo.res already specified This started after installing SP1 for VS 2003. This error happens on Debug builds, and only for incremental builds (not builds from scratch). I thought that the Service Pack 1 was the issue, so we uninstalled VS 2003 and reinstalled it without the service pack. However, I am still randomly getting the issue. Is it possible that some part of SP1 is still cached somewhere on the machine Has anybody else seen this issue I will try to put this in a loop and reproduce it, but it does appear to be quite random and I haven't had much luck reproducing it by hand so far. Any help is appreciated. ...Show All
Visual Studio Express Editions How do you do bitwise & of 2 enums?
Extreme noobie alert! :d How can I get the fallowing code to compile. I am trying to check if a enum contains a value using an & operator like this "this.mintAnchor & AnchorStyles.Right" but I keep getting compile errors regarding cannot convert to bool. Thanks ... // width if ((this.mintAnchor & AnchorStyles.Right) & (this.mintAnchor & AnchorStyles.Left)) { this.Width += WidthDiff; } else if (!(this.mintAnchor & AnchorStyles.Left) & !(this.mintAnchor & AnchorStyles.Right)) { this.Left += WidthDiff; } else if (this.mintAnchor & AnchorStyles.Right) { this.Left += WidthDiff; } // height if ((this.mint ...Show All
Visual Studio error MSB4018: The "ResolveNativeReference" task failed unexpectedly.
We are building a C# project that includes a C++/CLI 2.0 DLL. This DLL includes several native .LIB files. When we compile the LIB's and the DLL's we have no warnings or errors. When we add a reference to the DLL in the C# exe project and try and build, we see the following error - which we cannot find data on after searching around with google. Here's the error, please help! C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Microsoft.Common.targets(1202,9): error MSB4018: The "ResolveNativeReference" task failed unexpectedly. 3>C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Microsoft.Common.targets(1202,9): error MSB4018: System.ArgumentNullException: Parameter "metadataValue" cannot be null. 3>C:\WINDOWS\Microsoft.NET\Framework\v2.0 ...Show All
Visual Studio 2008 (Pre-release) image doesnot appear
hi all, i have a problem with my interface. i have an image which appears in the design mode, but when i run it doesnot appear . here is the image tag: <Image Grid.Row="0" Width="300" Source="/Images/xflow.gif" HorizontalAlignment="Center"> <Image.BitmapEffect> <OuterGlowBitmapEffect GlowColor="White" GlowSize="30" Opacity="0.3" /> </Image.BitmapEffect> </Image> is there a problem with that thnx ...Show All
.NET Development C# Asynchronous Socket. How to reject unwanted connection?
Hi all, I am a newbie on C# socket programming. Can anyone teach me how to reject an unwanted connection based on the IP This is my code (it does capture that the IP is not the wanted IP, but then after rejecting this, the main socket won't listen anymore): Socket tempSocket = m_mainSocket.EndAccept(asyn); string cIP = ((IPEndPoint)tempSocket.RemoteEndPoint).Address.ToString(); // I want it to only accept connection from 202.103.212.32 if (cIP != "202.103.212.32") { tempSocket.Close(); Console.WriteLine("Rejected connection from " + cIP); m_mainSocket.BeginAccept(new AsyncCallback ( OnClientConnect ),null); } else { m_workerSocket[m_clientCount] = tempSocket; tempSocket.Close(); } Please help, as I've been ...Show All
Visual Studio Team System Please tell me that this has been solved in SP1...
When you try to add a link from a work item to a versioned item in Source Control you may get an error "Unable to save all edited documents..." in Visual Studio. Someone said that this problem corresponds to a limitiation of the numbers of characters you may have in a file path (260 chars) but this happens to us in much shorter paths (around 100 characters). This is such a stupid limitation/bug which has huge consequenses on our project - please tell me that this has been solved in SP1 /Thomas Andersson Thomas, Firstly I want to apologize for any inconvenience that this issue is causing you and your team. We will double check again to see if this is fixed in SP1, and I again apologize i ...Show All
Visual C# Unicode Byte to string
I need to print some greek characters like αβδ from my C# program. By using Hex Editor, I know their HEX (or byte) value is CEB1, CEB2 and CEB3. So now, how should I construct the data and print it from my C# program I can't do this anyway. String temp = "" + 0xCEB1 + 0xCEB2 + 0xCEB3; It printed out as some numeric value. Ps. I don't want to hardcode the αβδ characters into my source code. What can I do Please help me. Urgent. I will grade you. Promise. Thanks Hi MVP, Thanks for your answer. I am getting closer to the answer I wanted. Other than the puzzle you have solved for me above, I also found another mistake I made in my printer class. Below is the original code: ...Show All
Visual Basic Button Styles: Rounded vs Rectangular
I have just upgraded from .NET 2003 to 2005, and I see that in the IDE, buttons have a different look - rounded corners and a lighter shade than the form background. Very nice. ...But when I run apps that were originally developed under 2003, the buttons revert to the older style at run-time. How can I get the newer button appearance at run-time Thanks in advance. Nope, that's not it, either. This only seems to be a problem for apps that are upgraded -- those built from scratch in .NET 2005 don't suffer this problem. But for any of you who are interested, I did find a solution at vbCity.com Thanks for your help. ...Show All
Game Technologies: DirectX, XNA, XACT, etc. GameComponent.Draw()... why?
I'm a bit confused about the GameComponent class, and its intended use. It would seem that it would be perfect for inheriting particular subsystems. InputComponent, NetworkComponent, etc... but you wouldn't want to draw any subsystem. So what was the logic behind having a Draw method for GameComponent Did the cart come before the horse, so to speak, with the GraphicsComponent How exactly is GameComponent meant to be used I thought I'd get it straight from the horse's mouth... and I have no idea what's with all the horses in this post. (My suggestions are in third post, if anyone cares). I'll second Dave in that I find GameComponent somewhat ambiguous. I'll post some comments as soon as I dig a little dee ...Show All
Visual Studio Express Editions View many database tables in one form
Hi. My program has a menu where you can choose between 90 database tables to view. My plan is to open another form with a parameter that says which table to show. So I have a form named Table. But the Table form needs to be able to choose between the 90 different tables. I drag and drop a table from the DatabaseDataSet, and thats one. But then I need to drag over another, and I got the problem. I need to be able to hide/'not create' all the other tables' datagridviews that I don't want to show. And without wasting resources on getting data from the other tables. Another problem is that the BindingNavigator (which I have modified) needs to operate with the chosen table. It has got a button which is going to export the table to Excel, and I' ...Show All
SQL Server Report - preview looks fine, but exporting to PDF splits controls!!!Help!!
Hi, I've build correctly my report using the most efficient tools. I've made the preview and it worked just fine!However, when I export to PDF, it splits the report heigth into two pages, having the columns of my table and other controls splitted. I'm already using the font size as 7 or 8 (depends), really small, I've tried hard to reduce their size, however the result remains the same...no resolution!! Is there anybody who may have or had this situation Any guests or help Thanks a lot! hi I had a similar situation when i exported my report to PDF and it inserted blank spaces and spilt the report. My solution was not to change the font but the margin size of the report. Try changing the size of the margins and see if it works... ...Show All
Visual Studio 2008 (Pre-release) FaultContractAttribute , May 22 Build With Go-Live
Hi, We are using the May 22 build of Wcf. This is a version with a Go-Live license. I've noticed that the FaultContract attribute can only be aplied to methods in this build. http://windowssdk.msdn.microsoft.com/en-us/library/system.servicemodel.faultcontractattribute.aspx The documentation here ( http://windowssdk.msdn.microsoft.com/en-us/library/ms733721.aspx ) has a section "Faults for the Entire Contract" For convenience, it is possible to apply the FaultContractAttribute attribute to an entire service contract as opposed to an individual operation. In that case, every operation in the service contract is able to return that type of fault. For example, in the following contract, any operation can return a MathFault: ...Show All
Windows Forms DropDownList in VB.Net
Hi I'm using DropDownList Box. I've binded values to that from database. when i select the item from the list i've wriiten some message to display. I've written that code in selected index changed event if dropdownlist.But when i select the first item from the list i couldn't get message. Please answer my question Thanks ...Show All
.NET Development OutOfMemory during BinaryFormatter.Serialize
I am receiving an out of memory exception when serialising a large object: using (Stream f = new FileStream(path, FileMode.Create)) { BinaryFormatter s = new BinaryFormatter(); s.Serialize(f, nodeTree); } Here is the exception trace System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown. at System.Runtime.Serialization.ObjectIDGenerator.Rehash() at System.Runtime.Serialization.ObjectIDGenerator.GetId(Object obj, Boolean& firstTime) at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.InternalGetId(Object obj, Boolean assignUniqueIdToValueType, Type type, Boolean& isNew) at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Schedule(Object obj, Boolean assig ...Show All
Smart Device Development Registering for driver events dynamically from MFC App/DLL
Hello All, We are developing a WinMobile application (MFC based) on VS2005. Can we register for events directly from dll Other question is how can we regsiter for events from an MFC application. MFC provides a array for registering callbacks but this looks like hardcoded, is there a way to do it dynamically. Can anyone tell how to do this Best Regards, Harsha ...Show All
