CodemasterMM's Q&A profile
.NET Development Troubles with DowngradeFromWriterLock
The method ReaderWriterLock.DowngradeFromWriterLock (LockCookie) throws an ApplicationException with the message "The parameter is incorrect." even though that the thread which calls this method has the write lock. I've been searching for the possible bug in my code for two days but I can't find it. Does anybody have a clue what's the reason for this behaving Here's what my code is about looking like: static ReaderWriterLock locker; private object _lockCookie; private void MyFirstMethod () { locker.AcquireReaderLock (Timeout.Infinite); ... _lockCookie = locker.UpgradeToWriterLock (Timeout.Infinite); ... MySecondMethod (); .... locker.ReleaseReaderLock (); ...Show All
Visual FoxPro MS SQL Server or VFP Database???
Hi every one, hi MVFPs, I am working with SQL Server database, but I wonder that I've got some big problem with SQL table that has more than 500,000 records. If there are about 50 connections access to that table with select, update,,, task, the SQL will become very slowly and return error message as: ....query out of time,,, or dead lock.... If I work with VFP database, there are about more 100 connections with command "use" the table, and so often tasks to seek, select, update.... but It still work well even if not too fast. And I have a VFP table with more than 1,5 billion records working hard like that. So now I don't know if I will working with VFP database or getting SQL instead because of the more security of usin ...Show All
.NET Development XML databinding to a comboBox in windows forms
Is it possible to bind information from an XML or app.config file to a comboBox in a windows application If so can someone point me in the right direction I have tried everything I can find but maybe I am just looking for the wrong thing. You don't need dateabase to create and fill up DataTable. You can create DataSet -- sort of in memory database. ( http://msdn2.microsoft.com/en-us/library/system.data.dataset.readxml.aspx ) In general if you have any data structure that you can bind to comboBox you can read information from XML and put it to this structure/class. ...Show All
Visual Studio Express Editions DataGrid Column
How to get Text of DataGrid Column programmatically. You're welcome... Just another thing... If you want to retrieve formatted cell values, you might want to try accessing FormattedValue property instead Value. Also, you can check for cell value types using ValueType and FormattedValueType properties. Andrej ...Show All
Game Technologies: DirectX, XNA, XACT, etc. HLSL - Pulling a list of techniques from FX file
Hi all, I've spent the last few hours searching for an answer for this to no avail. What I'm making is a simple MDX 1.1 app that lets the user select which technique from the FX file to run on a simple mesh from a combobox. My problem is that, while it's easy to get a list of EffectHandles for all of the techniques, getting the actual technique names is proving difficult. I noticed that there is a TechniqueDescription struct which has just what I need, but the constructor has no way of passing an effecthandle object (or anything else for that matter), and no method or property in the Effect class returns a TechniqueDescription value. So, my question is this - is there a way to extract a list of the technique names from an effect f ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Problem with RenderTarget2D SurfaceFormat
For offscreen GPU calculations, I am trying to use a RenderTarget2D with a non standard surface format (Bgra1010102 for example, but floating point would also be nice) on Windows. Afterwards I do some rendering into this RenderTarget and use it as a Texture for the rendering on the screen. However, whenever I use a different format than SurfaceFormat.Color it throws an exception at runtime (InvaldOperationException was unhandled). The code is something like the following: static private RenderTarget2D rtU0; rtU0 = new RenderTarget2D(graphics.GraphicsDevice, RenderSurfaceSize, RenderSurfaceSize, 1, SurfaceFormat.Bgra1010102); Could this be a problem with my graphics card (Nvidia GeForce FX Go5200) or do I have to initialize something for ...Show All
.NET Development send a mail message
I am trying to send a mail message. the body of the mail message must contain data picked from a web form, as an attachment. can anybody help urgent you would still use the above approach in regards to sending emails but in terms of sending all the fields with formatting (which fields ) then the best place to ask would be over at the ASP.NET forums: http://forums.asp.net as for formatting - what do you mean do you mean the input from textboxes I believe this can be done if you set the MailMessage object's IsHtmlBody = true property. ...Show All
Windows Live Developer Forums Targeting orders using MetroArea Target
Hello, All. I'm including my SOAP call below. I'm trying AddOrder using a MetroAreaTarget. The call does produce an order, but, it's unclear to me that the order is targeted at my metro area. Do you know how I can tell that the order is being targeted, and not launched for all users When I look into the UI to see my order, it looks like an order that is not targeted. When I create an order with targeting from the UI, it shows a little bit differently. This leads me to think the one I create through the API is not targeted. If you have any clues for me, I'd appreciate it. Thanks. SOW < xml version="1.0" encoding="utf-8" > <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmln ...Show All
Smart Device Development How can I create a text message(SMS) on Windows Mobile 5.0
I want to write a test message(SMS) on Pocket PC Phone(Windows mobile 5.0). I created SMS through IMessage::CreateMessage didn't like the one which created by hand on Pocket PC. The message that I created just like a EMail message. It contains Cc, Bcc. If I create a SMS by hand, the SMS only contains To of recipients. This Problem doesn't exist on Pocket PC 2003, and I can change message type from email to SMS on combobox selection on Pocket PC 2003. But I cann't change message type by programming on windows mobile 5.0 Pocket PC phone edition. Does someone can help me My codes: IMessage* pmsg = NULL; hr = pFolder->CreateMessage (NULL, 0, &pmsg); EXIT_ON_FAILED (hr, TEXT("CreateMessage Error")); ...Show All
Software Development for Windows Vista Smartcard based authentication with CardSpace
When choosing to use Smartcard based authentication with CardSpace, how does the transmission from the certificate between the smartcard reader and the STS takes place The Information Card specifies the thumbprint of the certificate to look for, but what is the exact technical background; does it just searches your computer's Certificates store and all smartcard drives for that certificate, and then sends it towards the STS Would like to know more about it, since nothing specifically seems to be documented about this feature I think I understand your problem a little better now and can see what you are trying to do. The bad news is, and hopefully I'm wrong here, is that this feature ...Show All
Visual Studio Tools for Office Can't install VSTO 2005 SE on Office 2007
What this doesn't address is that one can't install the VSTO SE package without already having the first version installed. This requires an Office 2003 SP1 product. The only Office 2003 item we used was Outlook, but since that was part of our Exchange 2003 license (even though it included all the secondary office appliations - ie - scanning, etc.), it won't allow us to install the original VSTO 2005 product. We purchased the Office 2007 upgrade so we are currently running the full 2007 Small Business license. So we now have a situation where we just bought the development environment for which we intended to run only the VSTO SE upgrade, since we have no need for 2003 support, only 2007. Sounds like it should work, but the point is we can ...Show All
Audio and Video Development Access Denied 80070005
Hello, I'm Michael, I'm trying to stream with windows media services and windows media encoder (also SAM Broadcaster Radio Automation Software) when I stream with pull mode all works perfectly, when I try to streaming with push I receive this error 0x80070005 Access Denied, well in the same server I dont receive problem, I think that the problem is restriction of access. Can you help me to resolve this problem I'm desperate. Thanks in advance. Again, you'll want the Windows Media newsgroups (follow link above) for your question; this forum is for questions on Media Foundation, which is the new multimedia platform for Windows Vista. ...Show All
Windows Forms Problem with RowChanging event
Hi, if have a DataSet (SQLExpress) whith 2 Tables. On one table I add a RowChanging event handler. When I add a record in a boud datagridview then an exception occures in the handler. (After changing the postion in the DGV the event is fired). Here my handler: void PCs_RowChanging( object sender, DataRowChangeEventArgs e) { if (PCsBindingSource.IsBindingSuspended) { return ; } try { MessageBox .Show(e.Action.ToString()); } catch ( Exception eX) { MessageBox .Show(eX.Message); } } I get and "Index out of range" exception and my DGV is a red rectangle with red lines across it. After the exception I can see my MessageBox telling "Add". For changes the things work fine - but the Add makes problems if I show ...Show All
.NET Development Connection string for a local visual sql databases (*.mdf)
Previously I've used access databases for different application which I create in Visual Basic (Visual Studio 2005). This time I need just a small db with one table (at this point), and I noticed the 'SQL database' (An empty SQL database for local data) at the project-> add new item option in Visual Studio. I created the database, and added a table. Both the database and the table itself can be viewed from the 'server explorer' window under 'data connections'. Everything is great up to this point. But how do I connect from my application to this database I guess there's no real SQL server running. I tried to create the connection string using a new.udl file, but it seems that none of the OLE connections can be used towards the mdf fi ...Show All
Visual C# Problem with Registry reading..
I am using Windows Vista now and developing a Registry code in C# but i was surprised why when i use this code to SetValue: RegistryKey ping_registry_key = Registry.LocalMachine.OpenSubKey("SOFTWARE\\Jassim\\ping-to-ip", true); ping_registry_key.SetValue("ip_address", txtIPAddress.Text); it saves the data under this key: HKEY_CLASSES_ROOT\VirtualStore\MACHINE\SOFTWARE\Jassim\ping-to-ip instead of: HKEY_LOCAL_MACHINE\SOFTWARE\Jassim\ping-to-ip The message I'm replying to is about as close as I found to being relevant to my question. The referenced page in the MSDN library is .NET centric and this question is specific to an application I'm responsible for which is not based on .NET. I've been unable to locate a similar p ...Show All
