andreas s's Q&A profile
Software Development for Windows Vista i want to transform general avi file to xvid avi file, debug is passed, but mediaControl->Run() returned error value:-2147024773
the following is the source code,please help me to solve this problem,thx a lot! ///////////////////////////////////////////////////////////////////////////// hr = CoCreateInstance(CLSID_AsyncReader, NULL, CLSCTX_INPROC_SERVER, IID_IBaseFilter, (void **)&pSource); if (FAILED(hr)) { printf("ERROR - Could not initialize Source filter"); return; } //////////////////////////////////////////////////////////////////////// hr = pSource->QueryInterface(IID_IFileSourceFilter,(void**)&psrc); if (FAILED(hr)) { printf("ERROR - Could not query Source filter interface"); return; } /////////////////////////////////////////////////////////////////////// hr = psrc->Load(sz ...Show All
SQL Server SQL Client Redirect - Database Mirroring
Hi All, My apologies if this question seems abit basic, but I'm a DBA by trade and programming .Net isn't my strong point ;) I've enabled database mirroring on 3 SQL 2005 servers, a principal, a mirror and a witness. Principal - SQL 2005 Enterprise Edition, SP1 Mirror - SQL 2005 Enterprise Edition, SP1 Witness - SQL 2005 Express, SP1 I've written some test code to test the mirroring but as soon as the connection is pulled from the principal, the client re-direct doesn't work and the program bombs. I'd be grateful fi someone could have a look at my code below and tell me if there's any schoolboy errors (NB, the user running the code is a sys admin on all 3 servers) Thanks in advance. Im ...Show All
Visual Basic printing a hard copy
So i have an app that has text boxes, labels, and comboboxes. the program populates a database. What i need to do now is Print a hard copy of the data (from a command button on the form) and send an email to someone (through Outlook).. Can anyone point me in the right direction on how to do this Thanks. Ian. this was very helpful THANK YOU! i was sending it to a .txt file and printing the .txt file but i think i will use this... THANKS AGAIN!!!!!! ...Show All
.NET Development Deleting a single row from related tables
Hi, I have 3 related tables. First one is the parent and the other two are children of the first one. Ican navigate through parent and its children using DataGridViews and relations. When I delete a single row from my parent table I want to delete only its children not all the deleted rows in child tables. When I use DataTable.GetChanges() and try to iterate through its rows checking if the row's foreign key matches to the parent row's primary key I have an exception saying "you can not access a property of any 'deleted' row" which forces me to delete all deleted rows from each child table. How can I get the deleted rows that belong to my parent row Thanks for any help. Not a professional solution but I must agr ...Show All
SQL Server MDX: Percentage-to-totals with subcubes (AW code sample)
I need to create a calculation that gives me the percentage of a members value relative to the total. My problem is that I cannot make it work when my query is using a subcube in the from clause. The calculated member is simply not able to look outside the defined subcube. In other words - the following query works as expected: WITH MEMBER [Measures].[Test] AS [Measures].[Internet Sales Amount]/( ROOT ([Product]),[Measures].[Internet Sales Amount]), NON_EMPTY_BEHAVIOR = [Measures].[Internet Sales Amount], FORMAT_STRING = "#.##" SELECT {[Measures].[Internet Sales Amount], [Measures].[Test]} ON 0, NON EMPTY [Product].[Subcategory]. MEMBERS ON 1 FROM [Adventure Works] WHERE [Prod ...Show All
SQL Server SSAS Cube and Report Model
After creating a cube in SSAS, is it possible to make this visible to users in Report Builder As far as I can see Report Builder uses report models which are based on a relational database for a data source view, so it seems I have to rewrite all the cube logic in order to make it available in Report Builder (otherwise I guess it's a case of telling users to connect to the Cube from Excel ) Thanks Not sure this answer your question or not. Once you deploy and process your cube go to SQL Server Management Studio, connect to Reporting Services. Create "New Data Source" by right click Home to OLAP database. data source type: Analysis Services connection string: data source=OLAPServerName;i ...Show All
Visual Studio Express Editions Going back to Originating Form
Okay, This may seem like a newbie question, and it probable is. How does one go back to an originating form when the originating form could be one of many, many options. So for example: You have twelve forms. Each named (for simplicity sakes) Form1 through Form12. Form1 can take you to each of the twelve forms. Forms 2-5 can take you forms 6-12. Forms 6-8 can take you forms 1, 2-5, 9-12 or they make go back to themselves (From Form 6 to Form 8 and vice versa) Forms 9-12 can take you 1, 2-5, 6-8 or they make go back to themselves (From Form 9 to Form 12 and vice versa) All Forms can always go back to Form 1 (which easy enough) But if I am on Form 9 and I want to go back to 5 (an orginating For ...Show All
.NET Development errors adding a web service with sockets to a C++ project
Hi everyone, I have a web service which communicates via TCP to a C# program. When I invoke it's methods through a browser, they work fine and can communicate perfectly with the C# program. However, when I attempt to add the web service to a C++ MFC DLL I've created, I get multiple warnings, but with only 2 unique: 1) Warning 3 warning SDL4008 : skipping unrecognized extensibility element, with c:\Documents and Settings\*******\My Documents\Visual Studio 2005\Projects\Extend\Extend\CalcSvc\CalcWS.wsdl 84 2) Warning 9 warning SDL4001 : only one SOAP port will be processed. c:\Documents and Settings\cpappas\My Documents\Visual Studio 2005\Projects\Extend\Extend\CalcSvc\CalcWS.wsdl 104 I am assuming it is because the web service opens a s ...Show All
Windows Forms Closing Managed Form Hides the Unmanaged Owner
Hi, Just wondering if anyone has seen this problem. Situation: I have an unmanaged app from which I'm using C++/CLI to instantiate a managed modeless dialog. I pass in the unmanaged Handle in the Show call (via a IWin32Window wrapper) to make the unmanaged app main window the owner of the managed form. This works fine in most situations. However, and here's the crux, if my managed form itself launches a modeless or modal dialog, then whenever I choose to close the original managed dialog, regardless of whether the child dialog has been closed or not, then the unmanaged app disappears . It either gets sent to the back or minimized, but the point is that it is no longer the top window. The application is fine, and clicking on the ...Show All
Visual C# Cloning - include event handlers
Hi there: I need to create at runtime an exact copy of one of the objects I'm using, so I created a "Clone" method for it -- same as other clone methods: NewObject newObject = oldObject.Clone(); Now, to copy property values I either have to code every single newObject.Property = oldObject.Property; or use reflection (GetType, GetProperties and loop). Either way is fine, the bit of a block comes when I also try to "copy" the event handlers: let's assume my oldObject implements a "clicked" event. When I create oldObject I add the event handler for the clicked event: this .oldObject.clicked += new EventHandler (myClickedHandler); What I want is newObject (the object that is clone ...Show All
Game Technologies: DirectX, XNA, XACT, etc. got all my scenes drawn up.. how to program them?
ok sense i got 16 years of drawing experienced i decided to draw my scenes and color them with art pencils.. its suppose to have aliens invading the city and you have to get rid of them with your gun, i dont no if i made the sketches for nothing but someone said i can put these sketches in the game, my brother helped with the art. Here is an example of how to display a bitmap in XNA http://geeklit.blogspot.com/2006/12/showing-bitmap-in-xna.html ...Show All
Visual Studio Express Editions Starting a process with a non default application
System.Diagnostics. ProcessStartInfo psi = new System.Diagnostics. ProcessStartInfo ( @"C:\DownloadLog.txt" ); System.Diagnostics. Process .Start(psi); This works fine if I want to open the file with notepad. How do I open this with another application, such as wordpad, or word Try using the full pathname of the executable: C:\Program Files\Windows NT\Accessories\Wordpad.exe C:\Program Files\Microsoft Office\Office11\WinWord.exe These names depend on the Windows and Office versions you have. Search your C: drive if it still doesn't work. ...Show All
Visual Basic creating file name with date
I'm using excel 2003 with VB 6.3 I am writing a macro to move some data around and do some subtotalling; I would the macro to save the file as nameispecify with the current date lpantos02012007.xls without me specifiying the date is there a way to do this Thanks! lpantos, Thank you for your question. I found an article titled Embedding the Assembly Date and Time in a MASM 6.0 Object and hope it can help you with you problem: http://support.microsoft.com/default.aspx/kb/79844/ Actually as is shown on the top of this forum, we don't support VB6 any more. I suggest you to post this quesion in the following queues in order that you can get your satisfied answer: Visual Basic Interop and Upgra ...Show All
SQL Server Replicating Schema Changes
Hi there, I'm using Sql 2005 merge replication and I have noticed something, I'm not sure if this is true or not:... My publication is set to replicate schema changes (replicate_ddl = 1). Now, I have noticed that schema changes are only replicated if the current snapshot is valid. Is this right If so why My next question carries on from the first. If I'm about to run a TSQL script on my publisher that will add a column or two to a published table, how do I ensure my snapshot is valid inorder for the ddl changes to be replcated Should I be using: EXEC sp_mergearticlecolumn @publication = <publicationname> , @article = <article name> , @force_invalidate_snapshot = 1 , @force_reinit_subscriptio ...Show All
.NET Development Internal vs. Public
Sorry if this is simplistic, but is it a viable design choice to restrict visibility of as many type members as possible in a Windows application exe to internal, rather than public This client will necessarily never be consumed by any other class or application. It also suppresses various VS warnings about uncommented members, which are irrelevant anyway in many cases. Thoughts, comments Hello All. nobugz: Sorry, I wasn't trying to go off-topic. I thought the question was pertinent to this: nobugz said: Hmm, I don't think it really matters when these are classes in a .exe. Although it is technically possible for another app to load the assembly for an .exe, this is rarely if ever do ...Show All
