🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.os.os2.networking
5 messages
5 total messages Started by hamish Thu, 03 Sep 1992 04:39
Accessing tcpipdll from watcom 9.0
#635
Author: hamish
Date: Thu, 03 Sep 1992 04:39
41 lines
2275 bytes
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?
Re: Accessing tcpipdll from watcom 9.0
#300
Author: hamish
Date: Sun, 06 Sep 1992 21:11
80 lines
3787 bytes
From:	IN%"HAMISH@waikato.ac.nz"  "Hamish Marson"  7-SEP-1992 09:07:44.49
To:	hamish@waikato.ac.nz
CC:	
Subj:	Re: Accessing tcpipdll from watcom 9.0

Date: Mon, 7 Sep 92 09:07 +1200
From: Hamish Marson <HAMISH@waikato.ac.nz>
Subject: Re: Accessing tcpipdll from watcom 9.0
To: hamish@waikato.ac.nz
X-VMS-To: in%"hamish@waikato.ac.nz"

>> 
>> 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[]);
>> 

Well. It turns out I'm doing it right. I just got some email from the kind
person at watcom, and have been informed that it is a bug in the watcom
compiler. Heres the mail message I got from him.

***********************

I saw your posting about a problem using gethostbyname with WATCOM C.
You have discovered a bug in the compiler. It refuses to believe that
a function can return a __far16 pointer. I'll pass the problem on
to the C front end developer. In the mean time, I've figured out
a workaround for you. It's a little bit of a kludge, but it's the only
way to get the right code generated. I tried a lot of variations but this
was the only one that worked. Here's the code.

struct hostent * __cdecl __far16 gethostbyname(char*name);
struct hostent *host;

this_works()
{
    struct hostent __far16 * workaround;

    *(long*)&workaround = gethostbyname("hi");
    host = workaround;
}

We make compiler patches available regularly. We'll be releasing patch
level 'C' very soon, and I'll try to make sure that the patch solves
the problem.

Patches can be downloaded from our BBS at (519) 884-2103.

Tech support can be reached at (519) 886-3700 or by sending mail to
tech@watcom.on.ca. They will add you to a list of people to be
notified when the patch becomes available.

Feel free to post this message to the news group if you want.
I'm replying from an MS-DOS box and can't do it easily.

***********************

Thanks to john from watcom for the info.

On another note. Are the watcom patches anywhere on the net? I don't have modem
access to the states and Canada. Could some kind soul upload them to ftp-os2
perhaps?


-- 
==============================================================================
|  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?
X11R4 / PMX / PM Window Manager / ATI Graphics Vantage 8514/a
#1369
Author: merlin
Date: Fri, 22 Jan 1993 14:44
14 lines
1185 bytes
Helpfull hint:  "pmx -pseudocolor" accepts color map modifications by clients.

QUERY:  Does anyone have a solution for what appears to be an inability
to move focus into existing an xterm after a subprocess launched from that
xterm is killed on the remote machine?

QUERY:  Does anyone know how to get PMX to recognize the middle of three
mouse buttons (we gave 3 buttons on ATI Graphics Vantage integral mouse)
instead of requiring emulation of middle button by pressing the right and
left buttons simultaneouslY?

SUBJECTIVE IMPRESSIONS:  ICAT is nearly trivial to use to configure TCP/IP
-- what a relief from just about any other way it is done on other systems!!
Also, PMX server seems faster and more responsive than SCO ODT 1.1 server!!
Re: X11R4 / PMX / PM Window Manager / ATI Graphics Vantage 8514/a
#1390
Author: Charles Carlson
Date: Sat, 23 Jan 1993 19:17
17 lines
1424 bytes
In <1jp18hINNt9d@neuro.usc.edu> merlin@neuro.usc.edu (merlin) writes:

>QUERY:  Does anyone know how to get PMX to recognize the middle of three
>mouse buttons (we gave 3 buttons on ATI Graphics Vantage integral mouse)
>instead of requiring emulation of middle button by pressing the right and
>left buttons simultaneouslY?

Yes!  When will this work IBM?  I have a 3 button mouse on my OEM Wonder XL
and I hate having to emulate the third button, then go work on a real
Xterminal and have people looking at me funny because I'm trying to do
odd things with the mouse.

-- 
/ Charles Carlson  umcarls9@ccu.Umanitoba.CA  
\ This .sig now available on a limited edition 2 record set, for 4 easy 
/ installments of $19.95 each. To order, please have your Visa or Mastercard
\ ready and phone: 1-800-555-1212, or send check or MO to 200-155 Carlton St.
Re: X11R4 / PMX / PM Window Manager
#1451
Author: Michael Traub
Date: Tue, 26 Jan 1993 11:35
26 lines
1650 bytes
In article <1jp18hINNt9d@neuro.usc.edu> merlin@neuro.usc.edu (merlin) writes:
>QUERY:  Does anyone have a solution for what appears to be an inability
>to move focus into existing an xterm after a subprocess launched from that
>xterm is killed on the remote machine?

I have a slightly different problem. When XDM starts up and gives me
a login screen it takes the mouse/keyboard focus and refuses to give
it up! I cannot access anything else on the desktop until I log in
to the Unix host. Once logged in focus works as expected. As soon
as I log out again and XDM's window re-appears I again cannot change
the focus. The XDM is from SCO's Opendesktop 1.1 (X11R3).



-- 
Michael Traub
BT Customer Systems, Brighton Systems Centre. traub@btcs.bt.co.uk

    JOE, taxi driver: Unemployment will rise and sooner or later the
    masses will revolt against it. There'll be civil disorder and the
    further breakdown of civil society. The end result I hope will be
    the triumph of the people over capitalism. I also wouldn't mind
    if a few more people used taxis this year - '92 was rotten.

(Taken from "Hopes and Fears" in The Guardian, December 31st 1992, a
section which looked at what people saw 1993 bringing)
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads