[so] [Tema 2][win] Eroare ReadFile
    Andrei Vasiliu 
    andrei.vasiliu2211 at cti.pub.ro
       
    Sun Apr 14 21:11:40 EEST 2013
    
    
  
Salut,
Folosesc scheletul de laborator 5 pentru tema pe windows. Cand apelez
functia ReadFile in MPI_RECV, imi da eroarea 87: ERROR_INVALID_PARAMETER. Am
incercat sa fac memset inainte la buffer-ul in care primesc datele, dar la
fel. Nu mai stiu ce sa ii fac. Aveti vreo idee?
Am atasat un code_snippet mai jos:
char*   msgq_recv(msgq_t m) {
	DWORD bytes_read=0;
	BOOL bRet;
	char *msg = malloc(BUF_SIZE * sizeof(char));
	DIE(msg == NULL, ALLOC_ERR);
	//memset(msg, 0, BUF_SIZE);
	bRet = ReadFile(m, msg, BUF_SIZE, &bytes_read, NULL);
	DIE(bRet == FALSE, "ReadFile");
	
	return msg;
}
Multumesc anticipat,
Andrei
    
    
More information about the so
mailing list