newntui/activex/msdevintegrator/src/msdevintegratorctl.cpp
//----------------------------------------------------------------------------------------
// Call this METHOD if you want to display text string "info" in the Developer Studio
// output window.
//----------------------------------------------------------------------------------------
Call this METHOD if you want to display text string "info" in the Developer Studio
output window.
Call this METHOD if you want to display text string " info " in the Developer Studio output window .
void CMSDEVIntegratorCtrl::SetInfo(LPCTSTR info)  {
register unsigned i;
unsigned char byte;
char *p = (char *)info;
	 for(i=0;i<strlen(p);i++) {
		 if(p[i]=='[') p[i]='<';
		 if(p[i]==']') p[i]='>';
	 }
     m_IntegratorServerConnection.Send(signature,4);
     byte=INFO_OPCODE;
	 m_IntegratorServerConnection.Send(&byte,1);
	 int len = strlen(p);
#error Change to network byte order everywhere in this file!
	 byte = (len & 255);
	 m_IntegratorServerConnection.Send((const char *)&byte,1);
	 byte = (len>>8) & 255;
	 m_IntegratorServerConnection.Send((const char *)&byte,1);
	 byte = (len>>16) & 255;
	 m_IntegratorServerConnection.Send((const char *)&byte,1);
	 byte = (len>>24) & 255;
	 m_IntegratorServerConnection.Send((const char *)&byte,1);
	 m_IntegratorServerConnection.Send(p,len);
}
void CMSDEVIntegratorCtrl :: SetInfo ( LPCTSTR info ) { register unsigned i ; unsigned char byte ; char * p = ( char * ) info ; for ( i = 0 ; i < strlen ( p ) ; i ++ ) { if ( p [ i ] == ' ' ) p [ i ] = ' ' ; if ( p [ i ] == ' ' ) p [ i ] = ' ' ; } m_IntegratorServerConnection . Send ( signature , 4 ) ; byte = INFO_OPCODE ; m_IntegratorServerConnection . Send ( & byte , 1 ) ; int len = strlen ( p ) ; #error  Change to network byte order everywhere in this file! byte = ( len & 255 ) ; m_IntegratorServerConnection . Send ( ( const char * ) & byte , 1 ) ; byte = ( len >> 8 ) & 255 ; m_IntegratorServerConnection . Send ( ( const char * ) & byte , 1 ) ; byte = ( len >> 16 ) & 255 ; m_IntegratorServerConnection . Send ( ( const char * ) & byte , 1 ) ; byte = ( len >> 24 ) & 255 ; m_IntegratorServerConnection . Send ( ( const char * ) & byte , 1 ) ; m_IntegratorServerConnection . Send ( p , len ) ; }
Call this METHOD if you want to display text string "info" in the Developer Studio
output window.
Call this METHOD if you want to display text string " info " in the Developer Studio output window .