Click here to Skip to main content
15,887,135 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionApplication loses focus Pin
Tommy Svensson13-May-09 4:35
Tommy Svensson13-May-09 4:35 
AnswerRe: Application loses focus Pin
Randor 13-May-09 5:30
professional Randor 13-May-09 5:30 
AnswerRe: Application loses focus Pin
«_Superman_»13-May-09 19:09
professional«_Superman_»13-May-09 19:09 
QuestionApplication crash when application launch. Pin
Le@rner13-May-09 2:33
Le@rner13-May-09 2:33 
AnswerRe: Application crash when application launch. Pin
Cedric Moonen13-May-09 2:44
Cedric Moonen13-May-09 2:44 
GeneralRe: Application crash when application launch. Pin
Le@rner13-May-09 2:47
Le@rner13-May-09 2:47 
GeneralRe: Application crash when application launch. Pin
Cedric Moonen13-May-09 2:58
Cedric Moonen13-May-09 2:58 
GeneralRe: Application crash when application launch. Pin
Le@rner13-May-09 18:11
Le@rner13-May-09 18:11 
void CLeftView::ConnectNet(void)
{                                                            
	CString server_name=mServer;

	CString dnsbuf_str = dnsBuf;
	IPdomain = HostInfo(dnsbuf_str);// this is line 640
	CString hostBuf_str = hostBuf;
	IPhost = HostInfo(hostBuf_str);
	
	if(Oncef==1)
	{
		hostCtr=0;
		Oncef++;
		LPSERVER_INFO_101 pBuf = NULL;
	    LPSERVER_INFO_101 pTmpBuf;
	    DWORD dwLevel = 101;
	    DWORD dwPrefMaxLen = -1;
	    DWORD dwEntriesRead = 0;
	    DWORD dwTotalEntries = 0;
	    DWORD dwTotalCount = 0;
	    DWORD dwServerType = SV_TYPE_SERVER; 
	    DWORD dwResumeHandle = 0;
	    NET_API_STATUS nStatus;
	    LPTSTR pszServerName = NULL;
	    DWORD i;
		nStatus = NetServerEnum(NULL,dwLevel,(LPBYTE *) &pBuf,dwPrefMaxLen,&dwEntriesRead,
							   &dwTotalEntries,dwServerType,NULL,&dwResumeHandle);
	   if ((nStatus == NERR_Success) || (nStatus == ERROR_MORE_DATA))
	   {
		  if ((pTmpBuf = pBuf) != NULL)
		  {
			 for (i = 0; i < dwEntriesRead; i++)
			 {
				if (pTmpBuf == NULL)
					 break;
				LPWSTR szSName=pTmpBuf->sv101_name;
				CString szSName_str = szSName;
				IPhost=HostInfo(szSName_str);
			

				if(_tcscmp(IPdomain,IPhost) && _tcscmp(mServer,szSName)!=0)
				{
					hCh1=GetTreeCtrl().InsertItem(szSName,0,0,hChild3);
					GetTreeCtrl().Invalidate(1);
					szHostList[hostCtr]=szSName;
					hostCtr++;
				}
				else
				{
					szHostList[hostCtr]=szSName;
					hostCtr++;
				}
				pTmpBuf++;
				dwTotalCount++;
			 }
			 if (nStatus == ERROR_MORE_DATA)
			 {
			 }
		  }
			m_bEnable1=TRUE;
			m_bEnable=FALSE;
	   }
	   else
	   {
		   m_bEnable=TRUE;
		   m_bEnable1=FALSE;
		   Oncef=1;
	   }
	   if (pBuf != NULL)
		  NetApiBufferFree(pBuf);
	}
}


To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.

GeneralRe: Application crash when application launch. Pin
Cedric Moonen13-May-09 20:24
Cedric Moonen13-May-09 20:24 
GeneralRe: Application crash when application launch. Pin
Le@rner13-May-09 20:33
Le@rner13-May-09 20:33 
GeneralRe: Application crash when application launch. Pin
Cedric Moonen13-May-09 20:54
Cedric Moonen13-May-09 20:54 
QuestionRe: Application crash when application launch. Pin
David Crow13-May-09 3:13
David Crow13-May-09 3:13 
GeneralRe: Application crash when application launch. Pin
Cedric Moonen13-May-09 3:22
Cedric Moonen13-May-09 3:22 
GeneralRe: Application crash when application launch. Pin
Le@rner13-May-09 18:28
Le@rner13-May-09 18:28 
GeneralRe: Application crash when application launch. Pin
Cedric Moonen13-May-09 20:17
Cedric Moonen13-May-09 20:17 
GeneralRe: Application crash when application launch. Pin
Le@rner17-May-09 20:12
Le@rner17-May-09 20:12 
GeneralRe: Application crash when application launch. Pin
Le@rner17-May-09 20:22
Le@rner17-May-09 20:22 
QuestionAtomic operations involving __int64 on 32 bit machines Pin
Eikthrynir13-May-09 2:14
Eikthrynir13-May-09 2:14 
AnswerRe: Atomic operations involving __int64 on 32 bit machines [modified] Pin
Randor 13-May-09 4:47
professional Randor 13-May-09 4:47 
GeneralRe: Atomic operations involving __int64 on 32 bit machines Pin
Eikthrynir14-May-09 0:17
Eikthrynir14-May-09 0:17 
GeneralRe: Atomic operations involving __int64 on 32 bit machines Pin
Randor 14-May-09 6:59
professional Randor 14-May-09 6:59 
QuestionS.M.A.R.T support in SCSI hard disk drive Pin
Abinash Mohanty13-May-09 1:27
Abinash Mohanty13-May-09 1:27 
QuestionRe: S.M.A.R.T support in SCSI hard disk drive Pin
Rajesh R Subramanian13-May-09 1:50
professionalRajesh R Subramanian13-May-09 1:50 
GeneralRe: S.M.A.R.T support in SCSI hard disk drive Pin
Abinash Mohanty13-May-09 2:31
Abinash Mohanty13-May-09 2:31 
AnswerRe: S.M.A.R.T support in SCSI hard disk drive Pin
David Crow13-May-09 3:14
David Crow13-May-09 3:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.