Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com Message-ID: <38DF8863.6158B30B@nyp.org> Date: Mon, 27 Mar 2000 11:12:19 -0500 From: "Joan M. Moss" Organization: New York Presbyterian Hospital X-Mailer: Mozilla 4.7 [en]C-CCK-MCD (WinNT; U) X-Accept-Language: en MIME-Version: 1.0 To: cygwin AT sourceware DOT cygnus DOT com CC: jmm9001 AT nyp DOT org Subject: Byte alignment problems?? Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit I am trying to port a C program from RS6000 to the PC (NT 4.0 Service pack 5). The program accesses a DLL. There is a version of the DLL on the RS600 and one on the PC. I do NOT have the source code for the DLL. I have been able to create .def and .a files for the DLL (thanks to some fine help from Oystein O Johansen, Larry Hall, Mikey, Jay Krell, and to the User Guide: Linking Against DLL's). I am using cygwin cygwin B20.1 to compile on the PC. With this particular DLL I had no problems with name mangling, ie none of the names had @nn at the end. I was able to set up the .def with a list of the function names and then I used: dlltool --def MYLIB.def --dllname MYLIB.dll --output-lib MYLIB.a to create my import library. This compiled, linked and seemed to work fine. But on a successful "log in" to the server the program blows up with: "Exeception: privileged instruction (0xc0000096), Address: 0x00401222" Even though prior to blowing up it prints out a message that the "log in" was successful. Please Note, that if I run the .exe with an invalid password then the program does NOT crash. Someone suggested to me there might be problems with byte alignment. Has anyone had experience with this? It seems to me that that could potentially cause this kind of problem. Are there special considerations for my structures? Another possibility is the fact that login int to the server would spawn a process. Can cygwin handle this type of application? Any ideas on this topic would be greatly appreciated. Thanks in advance for your help. -- J. Maurine Moss First consulting Group Management Services 333 East 38th Street New York, New York 10016 Tel: (212) 297-3081 Fax: (212) 297-4231 E-mail: jmm9001 AT nyp DOT org -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com