Jim Altrichter's Q&A profile
.NET Development Socket Send - Multiprocessor Data Corruption
I have an application that sends out large packets over a tcp socket. If smaller packets are sent, the packets reach their destination without corruption. However, the tail end of larger packets are corrupted. If I run the application on a single processor machine, the large packets are not corrupted. This problem only seems to happen on multiprocessor machines. I print out the packet before and after the send, and the packet seems to be correct in both cases. What about the Socket.Sent (c#) could be causing the data corruption The application is single threaded. It seems that the only the tail portion of the packet is overwritten with values. I have sent the same packet numerous times and the offset wher ...Show All
Windows Forms Web setup project or a windows setup project?
I want my customers to download my Windows app from my website. When I create the Setup project, do I create a web setup project or a windows setup project You should create a Windows setup project. You would use a web setup project if you were trying to install files to the web server. I will admit, the discussion for what web setups actually do and when to use them (provided here on MSDN) seems a bit wrong, especially the following paragraph: "To deploy an application for download from a Web server, you create a Web Setup project and add the project output group for the application to the Web Setup project in the File System Editor . After building the installer, you copy it to the Web ...Show All
Windows Forms Can't Publish in Microsoft Visual Studio 2005 Express Edition.
This is the first time I've ever had trouble but here is the error I get when trying to publish any project now: Error 2 SignTool reported an error 'Failed to sign bin\Release\iView.publish\\setup.exe. SignTool Error: Signtool requires CAPICOM version 2.1.0.1 or higher. Please copy the latest version of CAPICOM.dll into the directory that contains SignTool.exe. If CAPICOM.dll exists, you may not have proper permissions to install CAPICOM. '. iView Yes, iView is the name of the program I am trying to publish. It debugs fine. I copied the new version of capicom.dll into my system32 directory as directed in another thread, however, when I tried to regsvr32 capicom.dll in the run box from the start menu I got the following error: Lo ...Show All
Visual C++ Possible ATL buffer overflow in %Program Files%\Microsoft Visual Studio 8\VC\atlmfc\include\atldbcli.h
The ClearRecordMemory function buffer overflows and corrupts the heap when uLength is set to a correct WSTR length. As you can see, for the case DBTYPE_WSTR case, ulength is doubled. But if the length returned is correct, there is no need for the * 2 multiplication. The memset after the multiplication overwrites valid address space and the program crashes at a later point. A simple fix that works is: uLength = uLength + 2; Repro: Function tested against Microsoft SQL Server 2000 using Microsoft OLE DB Provider for SQL Server, VS.net 2005 and Windows XP SP2. Function causing the error: void ClearRecordMemory() throw() { for (ULONG i = 0; i < m_nColumns; i++) { DBLENGTH uLength = m_pColumnInfo[ i ].ulColumnSize; switch (m_ ...Show All
Windows Forms "The installed product does not match the installation source."
Greetings, We recently converted our VS2003 solutions/projects to VS2005; including our Setup/Deployment projects. For minor revision builds, as part of our internal testing process, we allow the testers to run a batch file to update their files - rather than uninstall / reinstall. Basically, the batch file deletes the EXE and DLLs and copies over new ones. Now, after the 2005 conversion, our testers have installed the converted application (v2.0.0.0). This week we released a minor revision (v2.0.0.1). After the batch file is run, the users starts the application via the desktop shortcut (created by the v2.0.0.0 install) and the installer starts a repair and gives the message: "The installed product does not match the instal ...Show All
SQL Server Backing up through VS2005
Hi, not sure I have should ask this in here or in the VS forums - but here goes anyway! My vb app is written using VS2005 with an SQL database. I'm now distributing this to users to use with SQL Express. It's hard enough explaining to them how to attach the database without going into the backup routines etc! So what I'd like to do is to have a "backup" button in my app, that backsup the database, trancates the log files & then shrinks the files. Is this possible Sure. As I said, if you have a connection that can issue a SELECT, it should be able to issue a BACKUP DATABASE (provided you have sufficient privs, of course). Just look up the syntax for BACKUP DATABASE in Books Onl ...Show All
Visual C++ MFC80D.DLL not found. New Twist
I am writing an managed C++ DLL that is to load an unmanged C++ DLL using LoadLibrary. The managed DLL uses Standard Windows Libraries, not using ATL, using Unicode. The unmanged DLL to use the Standard Windows Libraries, Not using ATL, not using CLR. When I invoke LoadLibrary, I get a message box indicating that the DLL can't be loaded because MFC80D.DLL can not be found. I've checked both DLLs, both have manifests imbedded that look ok. I've got another project that does the same thing but works. I checked all settings between the two projects and they look the same. The one that works was originally done in VS 2003. I've even tried copying the lines that indicate the project inherits the property sheets from upgrading fro ...Show All
Visual Studio Custome size printing option on a dot matrix printer
Hi fr. I have a problem with printing using Crystal reports. The problem is i want to print some data on custome page of 5" X 5" using a dot matrix printer and the printer should stop printing there itself it should not roll down to end of the page. Any idea how to do this.. Thanks Puneet Minda Hi, Try creating a custom page size. To do this, go to your Control Panel->Printers, goto File->Server Properties. From there create your custom paper size and set it on your printer's properties to use the custom paper size. cheers, Paul June A. Domag ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Scaling Sprites?(XNA)
Hi, I was wondering how I could scale textures, as the textures are too big than what I need for certain parts of the game, I think its in the SpriteBatch.draw method, but its hard to manuever through all of their intellisense arguments.... For XNA Would anyone be able to explain how I should be using the SpriteBatch.Draw overload functions to properly scale textures I'm a little confused about how to pass the parameters using the overloads and I think it may have to do with the way I've implemented my sprites. For the code below I am applying a texture that measures 100pix by 100pix to an object that is ...Show All
Visual Basic COM Object has been separated from its underlying RCW cannot be used
This is happening in a VB2005 Windows Forms app written to use existing 3rd party COM objects. All works fine in VB6, of course. The 3rd party vendor has exposed APIs to access their underlying data. Using these API objects involves instancing new objects, and logging on to them like in following pseudocode: Dim mySession As SessionObject DIM mySuite As SuiteObject mySuite = New SuiteObject mySession = mySuite.Logon(parameter, parameter, parameter) ...do things with various object(s) exposed to program... mySuite.Logoff(mySession) This last statement is what causes the error and generates the message shown in the subject. Not that I'm not trying to destroy the object, only invoke its Logoff method. This is not a multi-thr ...Show All
Visual Studio Express Editions Why would I be getting these errors?
It seems strange to this newbie why these errors are popping up in a Windows .h file. Can someone enlighten me ------ Rebuild All started: Project: Driver, Configuration: Debug Win32 ------ Deleting intermediate and output files for project 'Driver', configuration 'Debug|Win32' Compiling... driver.cpp D:\WINDDK\3790.1830\inc\ddk\w2k\ntddk.h(7944) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int D:\WINDDK\3790.1830\inc\ddk\w2k\ntddk.h(7944) : error C2146: syntax error : missing ';' before identifier 'InterruptTime' D:\WINDDK\3790.1830\inc\ddk\w2k\ntddk.h(7944) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int D:\WINDDK\3790.1830\inc ...Show All
Visual Studio Team System Hi, could i catch the "return null" statment in the code
Hi All: I want to create a Rule, the detail is: "if you declare a method, when the return type is Array, String or Collections, you should not explicit return null in the code, otherwise, some unpredictable result maybe will happen." For example: A method like: public int[] tryMethod() { return null; } the method violates the rule, because the method's return type is Array, but in the code, it explicitly returns null in the code. My question is: could i get the "return null" in the IL code by view the IL instruction. I had tried to get it, but i only get the "ret" instruction, i couldn't get the real return value, so could help me to find it, I'll be very g ...Show All
Visual Studio 2008 (Pre-release) Sample code / Demo projects
Hi Due to the abscence of the Sync Designer, it will help immensely if you can post either or all of the following: Documentation for Microsoft.Synchronization.Data.Client, Microsoft.Synchronization.Data.Server and Microsoft.Synchronization.Data.dll Sample code : Any demo projects Regards, Kk Hi William, I am working on uploading the sample right now. I don't think it is possible to post to the forum, so I am looking for other options. I expect to post a link to the sample project shortly. I cannot wait either, just few technicalities are delaying me :) Thanks, Rafik ...Show All
Visual Studio No Windows Forms Applications will run!
I have installed Visual Studio 2005 and Visual Basic 2005 Express. When I load a starter kit or just a Windows Forms app with the blank default form and then click start debugging the form will not load. The IDE blinks like it always does when running an app, but it never loads. it just comes back to its previous state with no errors or notifications of any kind. It happens with 2005 and 2005 Express. What am I missing ...Show All
Visual Studio 2008 (Pre-release) GetChangeText returning an unexpected select
When I run the following code: Northwind db = new Northwind(@"Data Source=.\SQLEXPRESS;Initial Catalog=Northwind;Integrated Security=SSPI;"); Customer cust = (from c in db.Customers where c.CustomerID == "LAZYK" select c).Single<Customer>(); cust.Region = "Washington"; Console.WriteLine(db.GetChangeText()); I get these results: UPDATE [Customers] SET [Region] = @p11 FROM [Customers] WHERE ([CompanyName] = @p0) AND ([ContactName] = @p1) AND ([ContactTitle] = @p2) AND ([Address] = @p3) AND ([City] = @p4) AND ([Region] = @p5) AND ([PostalCode] = @p6) AND ([Country] = @p7) AND ([Phone] = @p8) AND ([Fax] = @p9) AND ([CustomerID] = @ ...Show All
