Erik Pedersen's Q&A profile
Visual C++ More PDH trouble...
And now, I don't have the slightest clue where I'm going wrong - hey, at least it compiles. Here's the code: /* Este arquivo trata de verificar a carga de * processamento e a memoria livre do computador. * O resultado destas funcoes sera usado dentro da * funcao main e enviado para o cliente atraves do * servidor, a cada pequeno periodo de tempo. * Estas funcoes usam a interface PDH (performance * data helper), que interage com o registro do Windows. */ #include <windows.h> #include <stdio.h> #include <pdh.h> #include <pdhmsg.h> long getload(void){ PDH_FMT_COUNTERVALUE value; PDH_STATUS status; HCOUNTER pCounter; PDH_RAW_COUNTER raw1; LPDWORD type = NULL; WORD dwUserData = 0; PDH_HQUERY query = NULL; char c ...Show All
Windows Forms in a form i have six text boxes for auto fill
in a windows application i need to autofill six textboxes by parsing a resume can any one help me in a form i have six text boxes and a button when ever i press the button it should parse a word document and extract name mobileno email http age experence all these details should be filled in the text boxes ...Show All
Windows Search Technologies WDS 3.0 RTW gives error trying to index Outlook Express message store
When WDS 3.0 RTW tries to index the Outlook Express message store, I am getting the pop-up error: "Outlook Express could not be started. The application was unable to open the Outlook Express message store. Your computer may be out of memory or your disk is full. Contact Microsoft support for further assistance. (0x80004005, 183)" I have plenty of memory and the disk is not full. Does this version index OE Any idea how to resolve this Toshiba Satellite A105, 1.5 GB RAM, 4 GB min free on C: D: E:, Dual Core, WinXP MCE SP2, All patches. I get EXACTLY the same message when OE6 is running. I am so happy that I finally turned up something relevant. How hard is it to remove Desktop Search ...Show All
Visual C# Throw Exception gets unhandled error
I am creating a multi-layered application using dlls' and want to throw any exception that occurs (and also create my own exceptions to throw) back to the originating code. When I try this though I get an error that the exception is unhandled. I am trying to handle it by just throwing it. This occurs at the first throw which is in class a catch clause. The following dll deals with database access. The code snippet is : class a{ public object ExecuteScalar( QueryBuilder QB){ object res = "" ; try { string sql = BuildSQL(QB); // connect to the database and run the query SqlCommand cmd = new SqlCommand (sql, DBConnections .SQLConn); DBConnections .SQLConn.Open(); res = cmd.ExecuteS ...Show All
Visual Studio Team System "Get Latest Version" does not retrieve newly checked in files
A source code file, which was referenced in a project file,was missing on my local hard drive. I asked a collegue to add that file to TFS source control. Then I used the command "get latest version" on the project but the file was not downloaded. I had to select the file in Source Control Explorer and use the "Get specific version" with "Force Get". Is this by design Hi Richard: The first thing that I would say is that not getting files that are in version control is not By Design. I think it is probably some type of timing issue or you got into a situation where the system thought you already had the file. Either way it seems that you got out of that state. If you have ...Show All
Visual Studio build crashes vs 2005 without clean
Hello, In one of my library solutions, with multiple projects. Unless I do a clean, the build fails and vs 2005 crashes. Any ideas Jason Hi Simon, The problem is that the only thing that is displayed is the send info to MS dialog, there is no error shown (unless I need to look somewhere for a log that I don't know about. I am not using any type of custom build. Jason ...Show All
Software Development for Windows Vista Writing only selected frames in AVI?
Greetings, I'm trying to pass to file writer filter only selected frames from a stream. I have written a transform-in-place filter that passes through only those frames that I need, but file writer writes the same frame several times (instead of writing it only once and waiting for the new frame to arrive). How can I invalidate frame once it has been written so that it won't be written again Thank you in advance, Murom AVI files do not have a per-frame timestamp. They only support a fixed frame rate. So you cannot pick and choose when to write a frame. If you have started at 25fps, then you must keep 25 fps. MPEG-4 files do not have this limitation; nor do stream-based container formats such as mpeg-2 PS. G ...Show All
.NET Development How can I get my asp.net application faster with .net CLR
Hi gurus, how can I optimize any asp.net application's speed with the help of using CLR. What rules should follow to do that any articles or checklist is required Cheers Agha, Unfortunately there isnt a silver bullet that will help managed applications run faster. Performance Optimization is done on several levels, not just the CLR. Infact in my experience, 99% of the cases run fine with the default CLR settings. Is there a specific performance problem you are facing Here is a basic guide to some elementary ASP.NET perf tuning. http://samples.gotdotnet.com/quickstart/aspplus/doc/perftuning.aspx For GC/Memory tuning look up Maonis blog at http://blogs.msdn.com/maoni/ There is an interesti ...Show All
SQL Server Oracle 9i -> SQL Server 2005: Violation of PRIMARY KEY constraint
Hi there, When the distribution agent runs trying to apply the snapshot at the subscriber I get the following error message Message 2006-06-24 12:41:59.216 Category:NULL Source: Microsoft SQL Native Client Number: Message: Batch send failed 2006-06-24 12:41:59.216 Category:NULL Source: Microsoft SQL Native Client Number: 2627 Message: Violation of PRIMARY KEY constraint 'MSHREPL_1_PK'. Cannot insert duplicate key in object 'dbo.ITEMTRANSLATION'. 2006-06-24 12:41:59.216 Category:NULL Source: Number: 20253 What could possibly cause this error And how can I possibly fix it Best regards, JB i have the same problem with with Oracle 10g -> SQL Server 2005 (see Link ). I use replication (merge ...Show All
Visual Basic passing variables between forms
I am having serious issues trying to take data from one form and passing it to another form... I have a 3 form new employee application that gets information from the new employee in textboxes and then sends it to a database... my problem is that once i make an instance of the form: dim theFirstForm as new Form1... and dime theSecondForm as new Form2. i cant seem to figure out how to access it and store it in variables... so that on the third form i can access it and populate a database with all the information. My programming teacher made the suggestion to make a new class and send all the info to the class and then on the submit button access it from there and then populate the database... any suggestions on the best way to do this i hav ...Show All
SQL Server sp and applicatins
We need to do an audit of all objects(sp, etc) in the database. Each object need to be validated if any apps use it. Then keep an updated way of knowing what sp is used by what application(a grid somewhere) Note: We have some sp's that are used by two or more application. any ideas That only works with insert, update, and delete. If you need to also audit selects, triggers are not going to help and neither will any of the 3rd party auditing products that I'm aware of. ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Collision Detection With Bezier Curves
Hi, I'm currently making a small 2D game in XNA Game Studio Express. It involves a player moving around a terrain and being able to collide with it. Nearly all the graphics and settings in my game are user generated so this allows for everything to be quite customisable. For collision detection the user specifies paths made of Bezier curves which are stored in a file. The game reads this file and stores a number of points on the curves in an array. The player is also made of Bezier curves that are converted into points: This shows how I want collision detection to happen; if any of the lines that make up the player intersect with any of the lines that make up the terrain, then a collision has occurred. Once a collision has occurred two t ...Show All
SQL Server How to disable Export
Hello, I am making a web application and I will show reports with the reportviewer, however the user can manage some parameters of the applicacion, the administrator can decide if he wants to allow the user to export or not export to PDF or XLS. Anyway, I want to enable or disable those options in the reportview dinamically! Is that possible I am going to take a guess based on 2 things you have said: "export to PDF or XLS". You don't mention other formats. "If I use Object o = info.GetValue(extension), then the object o is not null. " Is this an RDLC, not an RDL In which case what exactly is decorating a ServerReport going to buy you Either way, you can do what Brian said (set ReportView ...Show All
.NET Development Asynchronous Sockets, BeginConnect
I am trying to use the BeginConnect() method. Maybe I am not understanding it properly but I thought it would keep trying to connect to whatever host:port you asked it to until it connected (or times out maybe ). If this is the case then does anyone know how to change the timeout interval, or make it so it doesnt time out. I have an application that wants to keep polling a given host to see if its there, and if it is then connect to it. Is there a better way to do this if I am totally wrong on the BeginConnect stuff Any help would be greatly appreciated Thanks TcpClient client = new TcpClient(); public void TryConnect(IPAddress serverIP, serverPort) { this.client.BeginConnect(serverIP, serverPor ...Show All
Visual Studio Express Editions How to use MS Word automation in WebBrowser Control
Using VS 2005... Added a Web Browser control to my Windows form and can successfully navigate to a Word doc. The question is - how do I access the Word object that is displayed on my form. I can do all the Word stuff on the form but I need to access the document programmatically. Basically I need to convert from the HTML document to a Word document. Thanks for the rapid replay AND ANSWER. I am using .Net 2005 and I am including a code snippet for anyone else who may have a need to do this. I am using Word but it should work for Excel. Ray Microsoft.Office.Interop.Word. Application app = null ; try { app = (Microsoft.Office.Interop.Word. Application )System.Runtime.InteropServices. Marshal .GetAct ...Show All
