home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!wupost!waikato.ac.nz!hamish
- From: hamish@waikato.ac.nz
- Newsgroups: comp.os.os2.programmer
- Subject: Re: Accessing tcpipdll from watcom 9.0
- Message-ID: <1992Sep3.164055.10572@waikato.ac.nz>
- Date: 3 Sep 92 16:40:55 +1200
- References: <1992Sep3.163954.10571@waikato.ac.nz>
- Organization: University of Waikato, Hamilton, New Zealand
- Lines: 40
-
- >
- > I am attempting to use the tcp/ip dll from watcom C/386 9.0 under OS/2 2.0, and
- > have run into a bit of a problem. After adding the __cdecl __far16 combination
- > to the prototypes in the *.h files, I can get such things as sock_init() and
- > socket to work and return values, consistant with what they should. However I
- > can't get the gethostbyname() function to return a decent valid pointer to a
- > bloick of memory (ie the host entry). I have it declared as
- >
- > struct hostent * __cdecl __far16 gethostbyname(char hostname[]);
- >
- > and am declaring a ptr in the program as
- >
- > struct hostent *host;
- >
- > and doing
- >
- > host=gethostbyname("sol.cs.waikato.ac.nz");
- >
- > but the program dies trying to access the returned block with access
- > violations. (The ptr returned is 0x0a4277bc if that helps). The executable is
- > being linked with tcpipdll.lib (From the 1.2.1 programming toolkit).
- >
- > I thought the thunking layers were supposed to provide access to 16-bit dll's?
- > Or am I doing something wrong? Should I re-create the .lib file using wlib? Or
- > should this work with the microsucks .lib file in the kit?
- >
- > Or is there something else I am doing wrong?
- >
- > TIA.
- --
- ==============================================================================
- | Hamish Marson <h.marson@waikato.ac.nz> OS/2 |
- | Programmer (n/5), School of Computing and Mathematical Sciences |
- | University of Waikato, |
- | Hamilton, New Zealand. |
- |Disclaimer: Anything said in this message is the personal opinion of the |
- | finger hitting the keyboard & doesn't represent my employers |
- | opinion in any way. (ie we probably don't agree) |
- ==============================================================================
- Q. If Nuclear Tests are so safe, why don't the French do them under Paris?
-