Jump to content

  • Log In with Google      Sign In   
  • Create Account

We need your help!

We need 7 developers from Canada and 18 more from Australia to help us complete a research survey.

Support our site by taking a quick sponsored survey and win a chance at a $50 Amazon gift card. Click here to get started!


Member Since 10 Apr 2006
Offline Last Active Jun 25 2012 12:25 PM

Topics I've Started

Can someone steal my .com domain if they register the trademark?

13 February 2012 - 10:58 AM

I was asked to sell one of my .com domains and I refused. But I don't have a trademark.
I am afraid that the guy will register the trademark and take it away from me.

How much does a trademark cost?

Can I break a Visual C++ program when a certain address of memory is written?

04 December 2011 - 10:34 AM

Some third party DLL loaded by GetOpenFileName is corrupting my memory. I want to know which so I can uninstall the program.
Due to a well known problem with adobe reader, I do call ::OleInitialize(NULL) right in the beginning of main(). But even with that hack, once I hover over a filename inside the GetOpenFileName dialog and the tooltip appears, my app's memory is corrupted and it actually crashes when it receives a WM_PAINT and tries to access that memory.
I want to break the debugging as soon as any code writes in that memory. Is it possible?


	vector<char> _Filename(1024);   	// buffer for file name

	//vector<char> _Filename(MAX_PATH);   	// buffer for file name

	::ZeroMemory(&_ofn, sizeof(_ofn));

	_ofn.lStructSize = sizeof(_ofn);

	_ofn.hwndOwner = *_Owner->Qdwindowp;

	_ofn.lpstrFile = &_Filename[0];

	// Set lpstrFile[0] to '\0' so that GetOpenFileName does not 

	// use the contents of _Filename to initialize itself.

	_ofn.lpstrFile[0] = '\0';

	_ofn.nMaxFile = _Filename.size();

	_ofn.lpstrFilter = _Filter;

	_ofn.nFilterIndex = 1;


		OFN_HIDEREADONLY | ( _Allowmultiselect ? OFN_ALLOWMULTISELECT : 0 );


Which image manipulation library should I use with C++ on Linux?

02 December 2011 - 10:01 AM


My game server is written in C++ and allows users to upload pictures. I need to create high quality jpeg thumbnails.
I have heard about imagemagic. Is that still the best image library for linux?

[Visual C++] App crashing in ostringstream constructor!

19 October 2011 - 02:38 PM

My application is crashing during exit, when I close the main window. "Access violation". It crashes in this line:
ostringstream Debugmsg ;

This line of code is called inside the destructor of a global object.

here is the assembly

  	ostringstream Debugmsg ;
0050B738  mov     	esi,esp 
0050B73A  push        1    
0050B73C  push        2    
0050B73E  lea     	ecx,[Debugmsg] 
0050B744  call        dword ptr [__imp_std::basic_ostringstream<char,std::char_traits<char>,std::allocator<char> >::basic_ostringstream<char,std::char_traits<char>,std::allocator<char> > (5E1D9Ch)] 
0050B74A  cmp     	esi,esp 
0050B74C  call        @ILT+20775(__RTC_CheckEsp) (48B12Ch) 
0050B751  mov     	dword ptr [ebp-4],0 

When I step in the above assembly code it crashes exactly in line 0050B744
Any ideas?

[TCP socket] Data not reaching the server occasionally

14 October 2011 - 11:44 AM

My client connects to the server and sends the login data. About 1 in 50 times the connect succeeds but the server does not receive any data, so the client hangs forever waiting for the server reply.
I checked both client and server logs and they show a successful connect.

I have TCP_NODELAY set.
The strangest thing is that when I terminate the server, with the client still hanged, the client detects that the socket was closed by the server.
I don't know how TCP works under the hood.
My guess is somewhere in a middle man router my connection was broken but neither side has detected it. Is this possible?
Is it normal for a TCP connection to break like this or am I doing something wrong?