Dharan Prakash's Q&A profile
Visual C++ Is TerminateProcess() enough to kill a process after CreateProcess()?
Hi, To kill a process created by CreateProcess(..) API function, is calling TerminateProcess(..) enough Or, should I also use TerminateThread(.) Actually, I launch the ftp.exe using CreateProcess(..). Being connected, if timeout occurred, I kill the ftp process by TerminateProcess(processInformation.hProcess,1),TerminateThread(processInformation.hThread,1) and CloseHandle(). What I want to know is, should I use TerminateProcess() and TerminateThread(), or ether of them. And after terminated ftp process in force, what about the TCP stack layer's behavior Aren't any problems See Windows SDK forum for Windows programming questions . TerminateProcess and TerminateThread are too much. See the documentation. They should not be used ...Show All
SQL Server Count rows imported by bulk insert
I have a stored procedure which will run automatically. I've got try...catch code in the procedure, but I found a bug with the code where if there are any import errors, it doesn't recognize that that there was an error and it runs through the try code as through there was no problems. (I reported the bug). I added some code using @@rowcount to check if there were rows imported, and if not, it moves the data file to a error folder so I know there was a problem with the import. But this only checks if at least one row was imported, not if all the rows in the datafile have been imported. (i.e. if the first row imported correctly, and the second did not, it still sees it as successful). The problem is some of the data files hav ...Show All
Visual Studio 2008 (Pre-release) Synchronisation roles
Hello! Throughout the whole topic of synchronisation the roles client and server are mentioned, and as I understand that doesn't imply that server would be situated on the server machine, the same goes for client. Could you please provide the criteria that help to decide which role in sync process party should take Thank you. Server is the role of an application or service that publishes content for clients to consume. The server expects one or more client to sync with it. The server does not store sync state for each client to achieve higher performance and scalability. Client is the role of an application that consumes content published by a given server. The client stores the state of sync. Client i ...Show All
Visual Studio Express Editions How to extract RGB value from HBITMAP?
Dear everyone, Do you know how to extract RGB value from HBitmap The following code extracts a frame from a video using DirectShow, but I don't know how to get the RGB from the HBITMAP at the last line of the code. Could you help Thanks. ======================CODES===================== long size; hr = pDet->GetBitmapBits(1, &size, 0, width, height); printf("Size %i \n", size); if(SUCCEEDED(hr)){ char* pBuffer = new char[size]; if(!pBuffer) return E_OUTOFMEMORY; try{ hr = pDet->GetBitmapBits(1, 0, pBuffer, width, height); printf("pBuffer [%c] \n", pBuffer[3]); } catch(...){ delete[] pBuffer; throw; } if(SUCCEEDED(hr)){ BITMAPINFOHEADER *bmih = (BITMAPINFOHEADER*)pBuffer; HDC hdcDest = Ge ...Show All
SQL Server Upsizing Wizard Skips Tables
I am in the process of porting all of my Access 2003 databases to SQL Server. I started with my smallest database, which has only two tables. I have run the wizard five times, with different settings, but every time it only imports the table structure without the data. Can anyone tell me what I'm missing here Also, I have created several databases which I can't use, named InstructorsSQL, InstructorsSQL1, InstructorsSQL2, etc. I deleted the database files, but the names are apparently still in the system, since SQL Server won't allow me to use the same name again. How can I get rid of these old names. Thanks, Mike There are a number of reasons the upsizing wizard skips data in the tables. You should search the Knowledge Base ...Show All
Commerce Server Marketing Manager - Target Custom Line Item?
One of the business rules for a project I am working on wants to apply a discount based on a custom property of a custom line item. Example: When WidgetLineItem.CustomProperty = "some_value", apply a 10% discount One, is this possible And two, how What would be the correct approach Thanks for any input Discounts generally target properties of the product from the catalog system, or properties of a profile from the profile system. Is this property going to be defined in the catalog system or the profile system If so, it should automatically be reflected in the Marketing Manager UI and can be used from there. If not, then you will not be able to use the out-of-box Mark ...Show All
Visual Basic How to tell if MaskedTextBox has had user input.
I was wanting to know how to tell if MaskedTextBox has had user input. My mask is ##.## but cannot make it where if the user put ##.#1 or if the mask is still untouched. Any help would be great. Thanks ...Show All
.NET Development [C#2005] Obtaining the "default gateway ip"
How can you get the default gateway ip in c# In my previous post we got the wan from whatismyip.com.. I can check the lan ip with : String strHostName = Dns.GetHostName(); IPHostEntry ipEntry = Dns.GetHostEntry(strHostName); IPAddress[] addr = ipEntry.AddressList; txt_lanip.Text = addr[0].ToString(); BUT I NEED TO GET THE DEFAULT GATEWAY as when you do ipconfig : see below: THANKS AGAIN ! To all (but Ill be back only in the morning... I zzzzz a lot now!!) IP Address. . . . . . . . . . . . : 192.168.0.10 Subnet Mask . . . . . . . . . . . : 255.255.255.0 Default Gateway . . . . . . . . . : 192.168.0.1 madlogik wrote: I've been stratching my head on how to use the gatewayipaddressinformati ...Show All
Visual Studio Tools for Office Determining the unique nature of an Email message
Prepare yourself, this series of questions is bound to go pretty deep. I am creating an application which munches many terabytes of data continuosly, while munching this data my application must determine if it has already munched this data before and prevent duplicates from inundating its repository. If it encounters a duplicate it simply records the fact that it found a duplicate, and where it found it, then moves on without copying the duplicate. Now to the hard part, emails. When my application finds an email message it needs to be able to determine if an email is unique or not. Is there a field that determines the unique nature of an email message Scenario: Now consider this, if I send an email (emai ...Show All
Windows Live Developer Forums Windows Media Player Powertoy
Windows Media Player - Powertoy Module The Media Player Power Toy is designed to allow you to play audio and video files within your Space. While editing your Space specify the URL of a Media file located on the web in the Media Power Toy and hit Save. This will allow the people viewing your Space to watch or listen to the media file you have linked. You can customize the experience even more by altering the player settings (like auto start, times to play, and player mode) while editing your Space. This feature is to be used for authorized content only. Please respect the creative efforts and intellectual property of others, and do not link to unauthorized materials. Linking to unauthorized materia ...Show All
SQL Server Trouble with Connectivity
I have been switched to recognize me as an admin. Now, I go to the database to link it to the SQL Server Database on the server. And I get the old heave/ho, first I go to a window that is asking for my DSN name. If I put something in or ignore it will then wisk me off to the next screen asking me to create a Data Source Name. The whole time I was surfing through the server attempting to get the correct path of the database that I supposedly set up. Well I did, but just has a couple of tables for now. That doesn't seem to work too well, telling me that the file name entered is invalid. Help... Hi, first make sure that you have enabled SQL Server for remote connections (see the screencast on my site for more information), ...Show All
Visual C# Exchange data between two applications
I'm looking for a way to exchange data between two applications running on the same system, one in Delphi and the other in C# ( in the future the one in C# will become dll assembly in SQL Server 2005) What I rejected: - extern files, - shared memory (it needs kernel32.dll to be imported ) - MS Message Queue (default Windows installation has no msmq) I thought about using pipes or sockets, but sockets need separate listening-thread... I'm looking for better idea. Any suggestions Sorry for my english.. Regards KonRi i Think the easiest way is to use the network. there are hundreds of already written class . and its a 5 min implementation. i dont really know the impact in th ...Show All
Windows Forms Clicking
Is it possible to pass through all clicks on a form's face to the applications below it For example, if there is a Form with a button on it, even If I click the button it passes through and clicks on this web page instead.. Hi, Can you let me know why would you like to do that If possible can you tell us your application scenario Thanks, Bhanu. ...Show All
Smart Device Development Display image in datagrid cell
I am trying to display an image in a datarow's cell on a DataGrid control. Can this be done; if so please help. Thanks It can be done on NETCF V2 SP1. Just Override Paint() on DataGridColumnStyle class and paint whatever you want including images. This should help: http://blogs.msdn.com/netcfteam/archive/2006/04/25/583542.aspx ...Show All
Visual Studio Tools for Office Problem with running word 2003 customization in Office 2007
Hi :) I have next solution: Customized word documents, which are on ASP.NET server. When user download one of these documents, customization should run. Assembly evidence for this document belongs to the code group : URL. It works fine with Windows XP and Office 2003. When i try to run it under Vista with Office 2007, it doesn't work. I get message like ' assembly * can not run ........ ' Like word 2007 doesn't recognize name, or manifest and ddl path. Only * is visible. Customization contains action pane and cached data. Thanx :) VSTO 2005 Office 2003 solutions require the VSTO 2005 SE runtime in order to run on Office 2007. Can you confirm that you have the SE runtime installed on the ...Show All
