RibenaUser's Q&A profile
Visual Studio 2008 (Pre-release) DuplexChannel and InstanceContextMode 's problem
Hi all: I want that a class which implements the serviceContract can recorde something, so I set the InstanceContextMode to be Single . As I did so ,I got a nullReferenceException. the code is here: namespace CallbackServer { class Program { static void Main(string[] args) { Uri uri = new Uri("net.tcp://localhost:8080/CallbackSample"); Group group = new Group() ;//the class implement the ServiceContract. using(ServiceHost host=new ServiceHost (group,uri)) { host.AddServiceEndpoint(group,new NetTcpBinding(),uri); host.Open(); Console.WriteLine("Success !!!"); Console.ReadLine(); } } } [ServiceBehavior(ConcurrencyMode=Conc ...Show All
Game Technologies: DirectX, XNA, XACT, etc. 10-bits per component graphics
I need to output 10-bits per component graphics but the System.Drawing.Color class only allow 8bits per component (0-255). Any idea You'll need to perform the appropriate enumeration to determine what backbuffer/display formats the device is capable of. If it will only allow 8888 formats then you're a bit stuck as you can't really force the hardware to do something its incapable of. If 2-10-10-10 render targets are supported you could do all of your intermediary rendering at a higher precision and then sample it down to 8-8-8-8 for the final output. This would be fairly similar to how FP16/FP32 HDRI rendering works - the intermediaries are floating point but the output is still 8-8-8-8 (usually). ht ...Show All
SQL Server Am I only one with the problem using CSV files?
Simple thing - trying to set up connection for CSV file. In Microsoft Excel - CSV is displayed OK. However - in SSIS - some records are broken - for example records where Description field contains: ""WHITE HOT."" I'm not expert on CSV format - but aren't double quotes used for escape in csv - and if so then WHY microsoft implements it one of their products and not it SSIS So what am I going to do now Thanks for the link. I was mostly pissed off that my 2 hour project was going to be days worth of work because they decided not to implement CSV. However - it did not take long for me to write the following code in VB Script Task (The components marked as asnwer in this linked post seemed not quite what i needed - ...Show All
Visual C++ COM+ Marshalling SAFEARRAY of NULL BSTRS on XP Professional
Running on a Windows 2000 & 2003 Server, I can pass a SAFEARRAY of NULL BSTRs (the address of each BSTR in the array is 0x00) to a COM+ object and that object receives a SAFEARRY of NULL BSTRS. On a machine running Windows XP Profesional, I pass the same SAFEARRY of NULL BSTRs to the same COM+ object, but the receiving object receives a SAFEARRAY of non-NULL BSTRs each of which point to null string (each BSTR in the array now has an address but the data at that address is 0x00). My COM+ object is using the NULL BSTRs as an indicator to ignore that field, whereas non-NULL BSTRs should be processed. So the same software is running on two different platforms, but receiving differing results. Any idea why XP Professional would beh ...Show All
Visual Studio 2008 (Pre-release) Exceptions and WCF
Hey! I have read the msdn documentation on handling faults in WSF but can’t get it to work. I have the fallowing Interface fore the service: [ServiceContract(SessionMode = SessionMode.Required, CallbackContract = typeof(IChatChangeHandler))] public interface IChatChangePub { [OperationContract(IsOneWay = false, IsInitiating = true)] bool subscribe(string inNickName); [OperationContract(IsOneWay = false, IsInitiating = true)] void unsubscribe(); [OperationContract] [FaultContract(typeof(userListFault))] List<string> getUserList(string inNickName); [OperationContract(IsOneWay = true)] void publishChatMessage(chatMessage inMessage); } As you can see i am using a costum faultExcetion(userListFault) that lo ...Show All
Visual Basic Why does my app try to connect to the internet?
This was really strange. After finishing my application (first one in vb.net) I ran it and for some strange reason it tried to open a port (1147) and according to my firewall it was listening not sending. I found this very strange because my application doesn't contain any code what so ever that would be able connect to the internet. I even tried a simpler application with just a form and a button and that one also tried to open up a port. When i blocked the program from trying to listen, it crashed giving me this error report. EventType : clr20r3 P1 : cmiss.exe P2 : 1.0.0.0 P3 : 44e17833 P4 : system P5 : 2.0.0.0 P6 : 4333ae87 P7 : 2ba8 P8 : 40 P9 : system.net.sockets.socket Does anyone else have the same problem or is t ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Rendering to a Texture?
I tried to do a search but kept getting an error message. I was wondering if anyone had an example on how to render to a texture under XNA. Thx Sorry, I should have included this in my previous post. It will throw the exception anytime the ResourceUsage is set to RenderTarget. I tried fiddling with the texture dimensions, levels and ResourcePool. ...Show All
Visual Studio Handling null values in a local report.
I have a local report in a VB .NET 2005 project which is demonstrating odd behavior involving null values. When I pass a dataset to the report in which a majority of the records have a null value in a given field, all records on the report display no data in that field even for records having data in that field. If I filter the dataset down so that only a few records have null values in that field, then the records which have a value properly display the data. The records with null values display #ERROR in on the report. Does anyone know how I can control this behavior other then making sure every field has a value Some of these fields are date fields and I don't want to put a dummy date in; if the user has not entered a date, ...Show All
Visual Studio Tools for Office Button action of VSTO
VSTO 1.How to retrieve the active worksheet value when click the button on action function. 2.How to select the worksheet (visible or invisible) when click the button on action function. VBA:- Worksheets("Sheet2").Visible = TRUE Worksheets("Sheet2").Visible = FALSE Please advise. Thank all. Version of Excel 2003 or 2007 Where are these buttons located you're clicking on Have you defined some Ribbon XML with buttons in the Ribbon And you want to call back to code in your Add-in If that's it, please copy/paste your RibbonX XML into your reply so that we can show you better. ...Show All
Visual Basic Sigh - I remember one-based.
Well, I know this is nothing new, but: What's with this zero-based (nearly) everything For i = 1 to Thingy.Count or For i = 0 to Thingy.Count -1 It is simply not true that the first element of anything in the universe is ZERO. It is not common-sense thinking. "How many items do you have in your hand " "One" "Show me the first item" "Error, you should have asked for the zero-th item" ha ha ha I would like to request that two versions of the .Net Framework be made available. One for those who love zero, and another one for those who love one. "Isn't the computer supposed to abstract away all that unfortunate zer ...Show All
Software Development for Windows Vista Visual Studio 6.0 SP5 setup on Vista Beta 2 (5384)?
Does anyone know how to get around the MDAC check in the Service Pack 5 setup of Visual Studio 6.0 For some reason it doesn't detect MDAC 2.5 or higher which it requires (even though Vista obviously has a later version - 6.0) and the setup will not continue from that point. I've tried every registry key I could think of to trick it into thinking MDAC is installed. Thanks Ted. So I know there was the whole 'copy your files over from XP' but i wasn't satisfied with that, so I did some digging, and figured out ... it checks for mdac which makes it fail, but we're going to remove that check for mdac. how to make service pack 5 install on vista beta 2 without another pc! Tutorial: Step 1) Open ...Show All
SQL Server Complex Query question. Using Sum and CAST operation.
Hi Can onayone tell me what is wrong with the below code. Thank you, SELECT P.FirstName, P.LastName, P.PortfolioID, P.PortfolioDescription, SC.Description, SC.SecurityID, SC.SecurityTypeID, SUM(T.Quantity) AS TQuantity, CASE SC.SecurityTypeID WHEN 11 THEN CAST(SUM(T .Quantity)) WHEN 2 THEN CAST(SUM(T .Quantity * (SELECT Price FROM dbo.SecurityPrices AS SP WITH (Nolock) WHERE T .SymbolID = SP.SecurityID AND PriceDate = '1/24/2007'))) / 100 ELSE CAST(SUM(T .Quantity * (SELECT Price FROM dbo.SecurityPrices AS SP WITH (Nolock) WHERE T .SymbolID = SP.SecurityID AND PriceDate = '1/24/2007'))) END AS Amount, P.AccountNumber, P.Acco ...Show All
Visual Studio Team System Task Duration MS Project vs. VSTF Task
The task duration in MS project is in days. I use man hours in my Team Project tasks (work items). If I say something will take 20 man hours, MS Project sees that at less than a day. What does one do to make more sense of this inside MS Project I messed with these settings before, but they didn't seem to help. In Team Explorer I have a work item task that has a remaining work hours = 12. In MS project I have hours per day = 6. The duration column shows this task as 1 day. Huh Looks like there's a math error in this calculation. Why is everything divided by 2 It is showing all tasks as taking half the time they really should take. Am I the only one with this weird issue ...Show All
Visual Studio Team System Delete team project and remove from SCE?
I deleted two team projects one got removed from SCE and one didn't How do I get rid of the one that didn't and why did one get removed and not the other I understand there is some sort of bug related to this but why one and not the other and there must be a way to get rid of that one that is left right If not do we now know if this is fixed in SP1 Is there a way to undelete the team project I was thinking about undeleting it removing all read permissions then deleting it again ...Show All
.NET Development How to find Application folder path.
I am creating a windows application where I would like to create a xml file if it doesn't exists in the root path. To get the Path I tried the following syntaxes Environment.CurrenDirectory Application.StartupPath Application.ExecutablePath But all return the path upto ..\bin or ..\bin\debug directory. where I have to use subtring to get the application folder path. If I create a setup file and install the application, and while running the application,the code where I used substring(..\bin) will through an error "Lenght cannot be less than zero" as there is no bin folder in the installation folder. So how to get the application folder path alone If I understand correctly, ...Show All
