Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com X-Originating-IP: [66.206.205.2] From: "Vishal Jain" To: cygwin AT cygwin DOT com Subject: Segmentation fault in NetUserGetInfo call Date: Thu, 13 Mar 2003 17:51:39 -0800 Mime-Version: 1.0 Content-Type: text/plain; format=flowed Message-ID: X-OriginalArrivalTime: 14 Mar 2003 01:51:39.0690 (UTC) FILETIME=[413CD0A0:01C2E9CC] Note-from-DJ: This may be spam Hi, I am using gcc to compile my code. I am linking to windows netapi32 library. This is the error I am getting when NetUserGetInfo call is executed Program received signal SIGSEGV, Segmentation fault. 0x77d7bf5c in RPCRT4!NdrCorrelationFree () from /cygdrive/c/WINNT/system32/rpcrt4.dll The code works fine if I use windows compiler. This is the code snippet LPWSTR domaincontroller = NULL; LPUSER_INFO_3 buffer = NULL; NET_API_STATUS nStatus; WCHAR *uni_domain = NULL; WCHAR *uni_username = NULL; uni_domain=L"foo"; uni_username=L"bar"; nStatus = NetGetDCName(NULL, uni_domain, (LPBYTE *)&domaincontroller); if(nStatus != NERR_Success){ retval = NULL; goto cleanup; } if(domaincontroller == NULL){ retval = NULL; goto cleanup; } nStatus = NetUserGetInfo(domaincontroller, uni_username, 3, (LPBYTE*)&buffer); if(nStatus != NERR_Success){ retval = NULL; goto cleanup; } NetGetDCName call is successful. It is dumping core for NetUserGetInfo I even hardcoded uni_username to a valid username. It doesn't help If I specify the 1st argument to NetGetUserInfo() as NULL and give a local user name it works. Is there anything I am missing? Thanks, Vishal _________________________________________________________________ Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/