RookieDBA's Q&A profile
Game Technologies: DirectX, XNA, XACT, etc. Swapchains?
I need to use multiple swap chains for my map editor, and a quick look in the XNA documentation revealed nothing on the matter. Alternatively, I could use a device for each window handle, though this seems like a huge waste of resources. Is there a way to do this that I am not aware of If you manage the GraphicsDevice yourself rather than using the Game helper class, when you call Present you can give that an IntPtr containing the handle of the window it should present into, so you can use a single backbuffer to render to multiple different windows. ...Show All
Audio and Video Development MFT help
I'm trying to create an MFT for Windows Media Player 11, based on the GrayScale sample in the SDK. The problem is in the ProcessOutput method. I'm unable to "Lock" the input buffer; it works fine on the output buffer. hr = pIn->QueryInterface(IID_IMF2DBuffer, (void**)&pIn2D); if (SUCCEEDED(hr)) { ::OutputDebugString("input buffer: 2D\n"); hr = pIn2D->Lock2D(&pSrc, &lSrcStride); } else if (hr == E_NOINTERFACE) { hr = pIn->Lock(&pSrc, 0, 0); lSrcStride = lStrideIfContiguous; //assert (cb == m_cbImageSize); } The first QI returns E_NOINTERFACE and the attempt to call Lock on pIn results in E_NOTIMPL. If I check the size of the input buffer, it's zero -- is this normal ...Show All
Visual Basic Changing Controls back to their Original Colors
Hey, I'm trying to create a simple web browser that supports tabbed browsing. (That is, using to tabs to open multiple windows without launching the program multiple times.) I have everything except the actual tab part complete. I need to know how to add a tab and assign a web browser to it. I can get it to add the tab but assignning the browser as a child is beyond my knowledge. If at all possible a full example of a tabbed browser would be most effective for not only completing the task but also for me to learn how to do it. It that is not available any help would be just as highly appreciated. I am using a TabControl and a WebBrowser for controls and both seem to work correctly. Other than that there a ...Show All
Visual Studio Team System How To Auto Deploy Web Deployment Project in IIS
I have a web project, called MyWebSite,the project lives at "D:\Code\MyWebSite". The solution (also called MyWebSite) lives at "D:\Code\Build Solutions". I have added the web deployment project,called MyWebSite_deploy,the project lives at "D:\Code\Build Solutions\MyWebSite_deploy". My workspace root folder is "D:\Code" and my projects and solution are checked into source control. I have created new build type,called "MyWebSiteBuild".And my build directory is "D:\build" and drop location is "D:\Temp". I have set the configuration platform to .NET. I can build the Web Deployment project(MyWebSiteBuild) on my dev machine and all is well. I am getting ...Show All
Visual C++ Corruption of the heap
Hi I am getting an error when I declare dynamic 2D array Like this int n = 10; int **nab = (int**) malloc(n* sizeof(int)); for (int i = 0 ; i < n ; i++) { nab = (int*)malloc(n * sizeof(int)); } I used ASSERT(AfxCheckMemory()); and i gives an error I am using visual c++ 2005 (mfc) thanx Your initial allocation should read int ** nab = ( int **) malloc ( n * sizeof ( int *)); Your allocation will not fail on 32bit architecture, but on x64, n * sizeof(int) will not be enough to store n pointers to int (int will still be 4 bytes, while pointers to int will be 8 bytes). Furthermore, you should use the new operator for allocations in C++, and even better -- use classes such a ...Show All
Visual Studio Team System Calling TFS Client APIs from Web Service
I have a web service that is using the TFS Client APIs. I have identity impersonation set to true in the config. If I run the web service under the ASP.NET Development Server, all goes fine. I log that the web service is running under my domain account, the current thread is running under my account, and I am logged onto the TFS server using my account. If I run the service under IIS, nothing works. I have windows authentication turned on and anonymous access turned off. I log that the web service is running under my domain account and the current thread is running under my domain accout. I see a logon error on the TFS server for the ASPNET account from my PC. The offending call is GetChangeset, althoug I imagine it would fail on ...Show All
Visual Studio How to enumerate all project/assembly references in a IVsProject?
I want to enumerate all project/assembly references in a IVsProject. How can I do it Is there any way to do it without using Extensibility (VSProject.References property) Thank you. Thanks for the answer, Based on previous experience in developing an add-ins for VS 2003/VS2005 I really prefer using VSIP interfaces. You are right, Extensibility model is much easier to leverage than working with the lower level VS SDK interfaces. But I faced with problems that many third-party packages and add-ins don't bother themselves implementing Extensibility interfaces correctly, and this makes any code that uses Extensibility very unreliable. When I used Extensibility model I got many exceptions that I did n ...Show All
Visual Studio Express Editions Question about Forms
Dear All i have developed an application which has mainForm, form1, form2 and form3, in mainForm.cs i created a button and created form1 using the following code form1 frm = new form1() frm.show() now in form1.cs i created a button and created another form as following form2 frm2 = new form2() frm2.show() now in form2.cs i created a button and created another form as following form3 frm3 = new form3() frm3.show() when i am pressing "Alt + Tab", i watch Four forms. My Question is 1) How to see one application form 2) Is there any way that old form be placeholder of newly created form 3) Or any trick An efficent solution will be appretiated Thanks Dear Akbar brother, ...Show All
Visual Studio 2008 (Pre-release) How do you walk the controls in a XAML page?
As I recall, in Windows I would do something like get the window handle, then find its children in order to enumerate the controls on a form. I'd like to do the equivalent in WPF, but not sure where to begin. Do I have to parse xaml (hope not) or is there a way to navigate the tree that contains the elements on a given pane/form. Please advise Thanks Hi Nick, I also face the same issue.I need similar control hierarchy as it was available in .NET 2.0. VisualTreeHelper doesn't suit as it returns all visual elements. LogicalTreeHelper also doesn't work as it doesn't display Items which are generated at run time. So what I did was I iterate in VisualTree and check if the element is control, if yes then I use that control. ...Show All
SQL Server How to select all columns except one column from a table ?
Hi I can't figure out how to do this and hope you guys can give me a hint.... I want to select all columns from a table except one column: For example, A table has 20 columns : {1,2,3.....20} To select all of columns in a table, i could use select * from table; However, I want to select only column {1....19} I do not want to type the column names in one by one in the SQL query, is there a way to achieve this in a short form of Select Thanks, Hi, For this you need to execute dynamic SQL. You can create a function which will return you the column names or you can do something like DECLARE @ColList Varchar ( 1000 ), @SQLStatment VARCHAR ( 4000 ) SET @ColList = '' select @ColList = @ColList + ...Show All
Visual C++ two forms one big problem
i have two forms - form A and form B. What i want to do is call both forms - with form B hidden. Then depending what the users does - Form A will make Form B Visible - then Until form B is invisible again get form A to hold. So far i have tried calling the form to be visible then trying: while(formB->Visible == true) { sleep(1000); } and that did not work at all. Discovered it was a threading problem. Now i want to avoid using threads - so am kind of stuck on what i should do...is it only possible through threading Is there anyway of halting one form while the other does some work I mean the worst case scenario i make a new instance of this form everytime then shut it at the end - but i need a number returned from it - which i ach ...Show All
Visual Studio Express Editions Need help filtering Dataset table by a value
I cant seem to filter down my dataset table by criteria in expression. Can someone tell me why I still have the same amount of rows after I use this filter select option. Private Sub Form1_Load( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase .Load Me .WorkListTableAdapter.Fill( Me .SQLDataSet.WorkList) MsgBox( Me .AccuLogic_SQLDataSet.WorkList.Rows.Count) End Sub Private Sub Button2_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Me .SQLDataSet.Tables( "WorkList" ).Select( "DSK = '999'" , "DSK" ) End Sub mike11d11 wrote: Can someone tell me why I still have ...Show All
Visual Studio Tools for Office outlook add-in 2002 vs 2003
I have built an outlook add-in on my machine (has outlook 2003) and is running fine. But when running the same dll in another machine (has outlook 2002) it fails. Any idea why Vikas Verma wrote: Does the Outlook 2002 machine have PIA's installed on them if not sure then first install them and then run it again FOR OUTLOOK XP (2002) http://www.microsoft.com/downloads/details.aspx familyid=C41BD61E-3060-4F71-A6B4-01FEBA508E52&displaylang=en FOR OUTLOOK 2003 http://www.microsoft.com/downloads/details.aspx familyid=3c9a983a-ac14-4125-8ba0-d36d67e0f4ad&displaylang=en Installed pia... Didn't work either. This code was written in VB6. The interesting thing is that the dll compliled from the same code fro ...Show All
SQL Server 2nd Post - Problem installing SQL Server 2005 Express SP2
Hi, I started applying "SQL server Express with advanced tools SP2" and had to stop on following items which I'm not too sure about what I must understand from step "Existing components". Those three items listed were: - "SQL Server DataBase Services 9.1.2047.00" => which I can check - "Reporting Services 9.1.2047.00" => which I can check - Workstation components and development tools 9.1.2047.00 => which is simply disabled If I then look at the details of that last item, I can see the following warning: Name: Microsoft SQL Server 2005 Tools Reason: Your upgrade is blocked. For more information about upgrade support ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Why is Game not a singleton?
I'm a bit puzzled by this - why is the game class not a singleton, i.e. there is and can be only ever one instance of it. I can't quite see any sensible reason to have more than one of them, but as it doesn't seem to be a singleton, I have to hold a reference to it anywhere I want to access game services from. Otherwise I could have just written Game.Instance.Services when I wanted access to them. Or perhaps I have missed something obvious (I know I can make my class that is derived from Game use this pattern, I'm just curious as to why it wasn't done like this in the framework in case I shouldn't be doing it either). Spacewar exposes ContentManager and GraphicsDeviceManager through st ...Show All
