This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Byte alignment problems??



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@nyp.org

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]