Null = Value does not evaluate to false, nor true. It's Unknown. So there are not only two values: True and False, but also Unknown From MSDN: A value of NULL indicates that the value is unknown. A value of NULL is different from an empty or zero value. No two null values are equal. Comparisons between two null values, or between a NULL and any other value, return unknown because the value of each NULL is unknown.
alejandrofuchs
Posts
-
T-SQL: null != value evaluates false [modified] -
Can not take my own IP address (Windows Server 2003)Yes, this works. I will change my code. I still have the doubt about why it doesn't work only on Windows 2003, but as this code works fine i prefer this new aproach. :)Thank you to you all for your help! PD. Only for curiosity :confused:, if somebody find out what's wrong on the original code under 2003, please write. :)alejandrofuchs@yahoo.com
-
Can not take my own IP address (Windows Server 2003)Thanks! First, i'm sorry, someone else (joseaxy) was already signed in codeproject in this machine, so my later response had that name. Second (again i'm sorry), i responded wrong, the rigth answer is: WSAGetLastError() returns 10110, WSALookupServiceNext is returning 0 the second time it is called. alejandrofuchs@yahoo.com
-
Can not take my own IP address (Windows Server 2003)Hi, I cann't take my own IP address on Windows Server 2003. This is the code i'm using, it works fine in Windows 2000 (Professional and Server) and Windows XP, but DOESN'T WORK IN Windows Server 2003. I'm getting crazy, Why it doesn't work only in Windows 2003?
int iSockErr = 0; HANDLE hnd = 0; WORD wVersionRequested = MAKEWORD(2, 2); WSADATA wsaData; try { //Inicializar los sockets if ((iSockErr = WSAStartup(wVersionRequested, &wsaData)) != 0) { throw 1; } DWORD dw; GUID guid = SVCID\_HOSTNAME; struct AUX{ WSAQUERYSET qsRestrictions; BYTE byte\[500\]; }aux; memset(&aux.qsRestrictions, 0, sizeof(WSAQUERYSET)); aux.qsRestrictions.dwSize = sizeof(WSAQUERYSET); aux.qsRestrictions.lpServiceClassId = &guid; if (WSALookupServiceBegin(&aux.qsRestrictions, LUP\_RETURN\_ADDR, &hnd)) { throw 2; } dw = sizeof(aux); memset(&aux, 0, sizeof(aux)); aux.qsRestrictions.dwSize = sizeof(WSAQUERYSET); while ( !WSALookupServiceNext(hnd, LUP\_RETURN\_ADDR, &dw, &aux.qsRestrictions) ) {
//IN WINDOWS 2003 aux.qsRestrictions.lpcsaBuffer IS ALWAYS NULL
ptyIP->d0 = aux.qsRestrictions.lpcsaBuffer\[0\].RemoteAddr.lpSockaddr->sa\_data\[2\]; ptyIP->d1 = aux.qsRestrictions.lpcsaBuffer\[0\].RemoteAddr.lpSockaddr->sa\_data\[3\]; ptyIP->d2 = aux.qsRestrictions.lpcsaBuffer\[0\].RemoteAddr.lpSockaddr->sa\_data\[4\]; ptyIP->d3 = aux.qsRestrictions.lpcsaBuffer\[0\].RemoteAddr.lpSockaddr->sa\_data\[5\]; } ...
Thank you very much.