agentf1's Q&A profile
Game Technologies: DirectX, XNA, XACT, etc. Writing raw texture data to file
Im trying to write the raw texture data to a file. Im doing this by locking the rect of the texture and then using WriteFile to write it to an opened file. texture->LockRect(0,&pLockRect,NULL,D3DLOCK_READONLY); WriteFile(hFile,pLockRect.bits,Width*pLockedRect.pitch,&dwWritten,NULL); Is this the correct number of bytes to write When I have large textures to write WriteFile fails with ERROR_INVALID_BUFFER. Has anyone got any ideas It depends on the format of the surface you are locking. Take a look at the SDK docs (D3DLOCKED_RECT). It describes there the meaning of the "pitch" parameter. At a first look, I can see that you should use Height * Pitch instead of Width * Pitc ...Show All
Visual FoxPro How to selectonentry an edit box in a grid.
Hi; I have a grid with 2 columns: a txtbox and an edtbox. For some reason the edtbox won't SelectOnEntry no matter what I do. I've tried to set selectonentry for the column and the control itself. I've set the format to "K" I've set DynamicInputMask to "K" highlight is .T. Nothing works. Any ideas >> No. All I'm trying to do is to selectonentry the memo field which the user tabs into. But in the process, I don't want all the other rows to show 'memo' as their content, but rather show the text of the memo field. Ah, I see! LEt mne look at this, I am sure there is a way ...Show All
Visual Studio Team System Performance Analysis in debug mode
Hi, i have a solution with 7 projects, one .exe project and 6 .dll projects. I want to profile info on one of the .dll project. I can do it in "release mode". My question: Is it possible to collect profiling (instrumentation) info in "debug mode" If possible, how can i do it When i try to do it, i receive the error message: "Assembly was not found. Please check your Application installation" Thanks. Abongs Ian, Thanks for your answer. I stil have a problem with profiling instrumentation in debug mode. Now i receive the error message: "PRF0025: No data was collected." after the solution was close. I thing i will follow your advice <spending time on areas that are not really perform ...Show All
.NET Development FTPWebRequest & SSL
Hi, I'm trying to do FTP over SSL (Explicit). When i try to access the Response like this response = (FtpWebResponse)request.GetResponse(); I'm getting the error Remote certificate was verified as invalid by the user. I'm able to login to the same ftp server & list the directory without using the SSL but when I use SSL i'm getting the error. I'm adding part of the tracing log file containing the error. Can anyone tell me how to fix the error Thanks Mohan System.Net Information: 0 : [2512] SecureChannel#50510248 - Remote certificate has errors: System.Net Information: 0 : [2512] SecureChannel#50510248 - A certificate chain processed correctly, but terminated in a root certificate which is not trusted by the trust provid ...Show All
Visual Studio Team System Keying off an event
I would like to be able to rename a folder upon a build status changed event. How can I key off this in an application You can use the eventing service of TFS, creating a webservice which will be called on the build status changed event by TFS, you can find some samples about webservices subscription to events in Visdual Studio SDK, MSDN, and blogs like this ones: http://blogs.vertigosoftware.com/teamsystem/archive/2006/07/13/Automatic_email_notifications_when_a_work_item_is_assigned.aspx http://blogs.conchango.com/howardvanrooijen/archive/2006/04/29/3894.aspx ...Show All
.NET Development Always inherit from MarshalByRefObject?
When using .NET remoting, it's obvious you must have some way of passing object values and refrerences to the remote server; but should you apply one of these practices always as a matter of course public class Password : MarshalByRefObject { ... } [ Serializable ()] public class Password { ... } I have noticed that the .NET framework inherits most (if not all) of it's objects from MarshallByRefObject. I seem to find myself now doing the same. Also, when is it best to use Serializable() instead of MarshallByRefObject Your reply didn't directly answer my question. My question was rather "is it good practice to always inherit from MarshallByRefObject " rather than the questio ...Show All
.NET Development Finalization aborted when taking locks inside finalizers
Hi, its me and my finalizers again. In my quest to get rock solid and predictable shutdown behaviour I stumbled accross the bizarre phenomen that when I take locks inside a finalizer the whole finalization stuff during shutdown is cancelled. Is this the expected behaviour or did I miss something using System; using System.Collections.Generic; using System.Text; using System.Threading; using System.Runtime.ConstrainedExecution; namespace LocksInsideFinalizers { class Other : CriticalFinalizerObject { ~Other() { Console.WriteLine("~Other called"); } } class Program { string myName; public Program(string name) { myName = name; Thread t = new Thread(ThreadFunc); t.IsBackgroun ...Show All
Software Development for Windows Vista Drawing over fullscreen video from AudioVideoPlayback
I've spent some time trying to render text or even a control on top of video being played at fullscreen using the AudioVideoPlayback namespace without any luck. Originally I was aiming to have a transparent control on top of the video, but if I can get text on top, or any control (transparent or not) I'd be happy... Can someone point me in the right direction Perhaps provide an example of something similar Hi, After I setting windowless mode, how can I make this setting work, or make the video draw on my window farming ...Show All
Visual C# Issues with C++ to C# migration
Im working on a device application (no this is not a device related question, just happens to be the context of my issues) and I continuosly get an error stating "Exception from HRESULT: 0x8005000A" Invalid Advise Flag. Any ideas on what this means or what I should be looking for I am also confused on the use of CreateEvent. This is something i ported over from the C++ app, (with some modification), but I do not know the signifigance of the method or what exactly it does. Any ideas This is what I've done so far class BBChannel : IChannelEvents { [ DllImport ( "kernel32.dll" , EntryPoint = "CreateEvent" )] static extern IntPtr CreateEvent( IntPtr eventAttributes, bool manualReset, bool initialState, ...Show All
Visual Studio Team System Installing Team Foundation for Use over the internet
Hello, I have developers that are in different countries and I am trying to get TFS installed on HTTPS. First issue is that my machine name "machine1" is not the same as the name developers will have to use to get to it over the internet "machine1.mydomain.com". I was able to figure out the SSL part but now how do I configure all the links in TFS to point to my extrenal name "machine1.mydomain.com" without breaking my installation Thanks, Frank My issue is that the machine's full qualified name is "machine1.companyhosting.com" and my outside name is "machine1.domain.com" will this still work ...Show All
Visual Basic Modifying datagrid doesnot update the dataset
Hi folks, I populated a Sql Server table into a datagrid using SqlDataAdaptor and dataset, which works fine. What I want to do now is to update the table when the data in the datagrid is modified. I added these 2 lines, but doesn't work, ds.AcceptChanges() da.Update(ds.Tables(0)) It seems that changes to the datagrid doesnot update the dataset. Any comments appreciated. Thanks! Windflower are you sure you have an Update command I see the select command has an Update command da.SelectCommand = New SqlCommand(" UPDATE apl_quotes ...Show All
Visual C# foxpro date format
I'm devoloping a windows application to retrieve data from foxpro table based on the date input by users. The following is the query I use for the selection select code from visits where visit_date= Does anyone one know which format shall I pass for the visit date 1)Is it in this format dd/mm/yyyy or some other format 2)Is there a way to set the visit_date to accept the format intended Note:I'm using vfpoledb. Hi Brother FoxPro dates are written in text as values surrounded by curly braces. An "unambiguous" date is preceeded by a caret - in other words: "{^yyyy/mm/dd} . Here's a VB example: Module Module1 Sub Main() Try & ...Show All
Visual Studio Express Editions VB Browser
I am making a Internet browser and I have run into some problems. I would like some help some someone here. Ok, The problem I have right now is that I would like it, when you hit the enter key after you type in a address in witch you what to go, that it will take you to the site. I do have a button for going to the address but I would like to make it easier to get there. This is the code I have now: Private Sub ComboBox1_KeyPress( ByVal sender As Object , ByVal e As Object ) If e.keyChar = Chr(13) Then Windows.Forms.Cursor.Current = Cursors.WaitCursor WebBrowser1.Navigate(ComboBox1.Text) Windows.Forms.Cursor.Current = Cursors.Default End If End Sub I know something is wrong with this but I ...Show All
SQL Server Test - populating tables with dummy data
In 2000, BCP seemed the way to go. DTS packages would also work. My question is, in 2005, what is the best choice I seem to remember that BCP ignored all referential integrity constraints, and applying them afterwords was a royal pain. I'm not a BCP expert by any means. Running this at the command line means using the DOS prompt correct What is 2005's answer to this No one answered this question, how do people normally insert dummy data into tables I mean, where does the data typically come from what process is used to insert the data Note: This is for testing purposes, eventually to be tested in a Web-based front-end which I know nothing about. thx, Kat ...Show All
Windows Forms 2D grid
As i said in a previous post, i am writing an editor where i can "draw" maps using tiles. The tiles will be put on a 2D grid, each tile an object, and i am thinking of using the TableLayoutPanel and fill all the cells with picture boxes which in turn will hold the tile itself. However i can't seem to find a way of fixing the cells height and width, they remain dynamic. So, how do i make all the cells in a TableLayoutPanel fixed in width and height. Or maybe i should approach this project a whole other way Thanks for the reply nobugz, the project im working on is actually a map editor for a tile based game, in my program i can (in the future) "draw" the map in the editor and save it to a text file that the game engine itself ...Show All
