From: tsoloane AT is DOT co DOT za (Tsoloane Moahloli) Subject: H 7 Apr 1998 01:12:17 -0700 Message-ID: <3528EB1F.51CEC48D.cygnus.gnu-win32@is.co.za> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: Gnu Win32 Mailing List Hi there, The following code segment seems to be somewhat errornous, or is this a bug in cygwin - I am using Beta 19 with ecgs 1.02. call seems to be returning ERROR_SUCCESS but my machine things seems to think otherwise. Oh yeah, I am running winnt 4 with service pack 3. the code segment.. //Get appropriate info on the key.. DWORD namelen, keys, maxvaluelen, values; if((RegQueryInfoKey(wwwkey, NULL, NULL, NULL, NULL, NULL, NULL, &values, &namelen, &maxvaluelen, NULL, NULL))!=ERROR_SUCCESS) { perror("RegQueryKeyInfo: Unable to get Registry Key Info.."); exit(1); } printf("values - %d\n", values); printf("namelen - %d\n", namelen); printf("maxvaluelen - %d\n", maxvaluelen); //Ladies and Gentlemen, Let the fun begin. Now read each Reg key 1 by one //act on it.... DWORD count, size; LPSTR instring, keyName; namelen++; keyName=(LPSTR)malloc(namelen + 1); if(keyName==NULL) { err_sys("Memory Error!!!"); } for(count=0;count