Click here to Skip to main content
15,903,385 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Problem in reading BMP Header Pin
CPallini26-May-14 22:01
mveCPallini26-May-14 22:01 
QuestionC Makefile warning: passing arg 2 of 'connect' from incompatible pointer type Pin
Office 36525-May-14 17:03
Office 36525-May-14 17:03 
AnswerRe: C Makefile warning: passing arg 2 of 'connect' from incompatible pointer type Pin
Richard MacCutchan25-May-14 21:43
mveRichard MacCutchan25-May-14 21:43 
GeneralRe: C Makefile warning: passing arg 2 of 'connect' from incompatible pointer type Pin
Office 36525-May-14 22:37
Office 36525-May-14 22:37 
GeneralRe: C Makefile warning: passing arg 2 of 'connect' from incompatible pointer type Pin
Richard MacCutchan25-May-14 22:52
mveRichard MacCutchan25-May-14 22:52 
GeneralRe: C Makefile warning: passing arg 2 of 'connect' from incompatible pointer type Pin
Office 36526-May-14 0:14
Office 36526-May-14 0:14 
GeneralRe: C Makefile warning: passing arg 2 of 'connect' from incompatible pointer type Pin
Richard MacCutchan26-May-14 0:23
mveRichard MacCutchan26-May-14 0:23 
GeneralRe: C Makefile warning: passing arg 2 of 'connect' from incompatible pointer type Pin
Office 36526-May-14 18:48
Office 36526-May-14 18:48 
thank so Must...but you can help solution me again Please??

Now gmkae build file dpss.c not warning already..but Plugin Me cann't sent password to protocal LDAP From Sun to Active Directory not have event log... I don't know sun directory need config port same function send_message
int send_message(char* message)
{
	char* ip = "172.32.5.107";
	char* port = "12199";

	if (argument[0] != NULL)
		ip = argument[0];
	if (argument[1] != NULL)
		port = argument[1];

	int sockfd, portno, n;
    struct sockaddr_in serv_addr;  
    struct hostent *server;

    char buffer[256];
    portno = atoi(port);
    sockfd = socket(AF_INET, SOCK_STREAM, 0);
    if (sockfd < 0)
	{
        error("ERROR opening socket");
		exit(0);
	}
	else
	{
    	server = gethostbyname(ip);
    	if (server == NULL) {
        	//fprintf(stderr,"ERROR, no such host\n");
        	//exit(0);
			close(sockfd);
			return(0);
    	}
    	bzero((char *) &serv_addr, sizeof(serv_addr));		
    	serv_addr.sin_family = AF_INET;
		
    	bcopy((char *)server->h_addr, 
         	(char *)&serv_addr.sin_addr.s_addr,
         	server->h_length);		
    	serv_addr.sin_port = htons(portno);		

		if (connect(sockfd,(struct sockaddr *)&serv_addr,sizeof(serv_addr)) < 0) {  //เพิ่ม (struct sockaddr *) เข้าไป
        	//error("ERROR connecting");			
			close(sockfd);			
			return(0);
		}		
    	bzero(buffer,256);
		n = write(sockfd,message,strlen(message));
    	//if (n < 0)
    	//     error("ERROR writing to socket");
    	bzero(buffer,256);
    	//n = read(sockfd,buffer,255);
    	//if (n < 0) 
        	//error("ERROR reading from socket");
		
    	//printf("%s\n",buffer);
	}	
	close(sockfd);	
    return 0;
	
}

GeneralRe: C Makefile warning: passing arg 2 of 'connect' from incompatible pointer type Pin
Richard MacCutchan26-May-14 21:33
mveRichard MacCutchan26-May-14 21:33 
QuestionGNU Gettext and windows localization Pin
Member 854422623-May-14 16:31
Member 854422623-May-14 16:31 
AnswerRe: GNU Gettext and windows localization Pin
Richard MacCutchan23-May-14 21:40
mveRichard MacCutchan23-May-14 21:40 
QuestionCFormView in CDocktablePane or docking frame CMDIChildWndEx Pin
Member 1074879523-May-14 6:16
Member 1074879523-May-14 6:16 
SuggestionRe: CFormView in CDocktablePane or docking frame CMDIChildWndEx Pin
Richard MacCutchan23-May-14 7:46
mveRichard MacCutchan23-May-14 7:46 
GeneralRe: CFormView in CDocktablePane or docking frame CMDIChildWndEx Pin
Member 1074879523-May-14 8:56
Member 1074879523-May-14 8:56 
GeneralRe: CFormView in CDocktablePane or docking frame CMDIChildWndEx Pin
Richard MacCutchan23-May-14 11:36
mveRichard MacCutchan23-May-14 11:36 
GeneralRe: CFormView in CDocktablePane or docking frame CMDIChildWndEx Pin
Member 1074879523-May-14 23:09
Member 1074879523-May-14 23:09 
GeneralRe: CFormView in CDocktablePane or docking frame CMDIChildWndEx Pin
Richard MacCutchan23-May-14 23:17
mveRichard MacCutchan23-May-14 23:17 
AnswerRe: here Pin
Software_Developer23-May-14 20:59
Software_Developer23-May-14 20:59 
QuestionCreateProcess() not working Pin
Member 420182022-May-14 23:51
Member 420182022-May-14 23:51 
QuestionRe: CreateProcess() not working Pin
CPallini23-May-14 0:10
mveCPallini23-May-14 0:10 
AnswerRe: CreateProcess() not working Pin
«_Superman_»23-May-14 0:24
professional«_Superman_»23-May-14 0:24 
AnswerRe: It works, you just dont have rehash.exe in C.\temp Pin
Software_Developer23-May-14 1:29
Software_Developer23-May-14 1:29 
QuestionResize a dialog Pin
john563222-May-14 21:32
john563222-May-14 21:32 
QuestionRe: Resize a dialog Pin
CPallini22-May-14 21:56
mveCPallini22-May-14 21:56 
AnswerRe: Resize a dialog Pin
Maximilien23-May-14 3:30
Maximilien23-May-14 3:30 

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.