🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.os.os2.programmer
2 messages
2 total messages Started by Marten Feldtmann Fri, 24 Jul 1992 21:48
Q: Using Smalltalk/V-PM and IBM C Set/2
#465
Author: Marten Feldtmann
Date: Fri, 24 Jul 1992 21:48
42 lines
1430 bytes
I've some problems using IBM C Set/2 and Smalltalk-V/PM together:

 I would like to call a self-made dll-routine from Smalltalk. Well the
test-dll, shown in the second book of Digitalk works ok, but now we come
to the first own routine and nothing works:

 Therefore two questions:

 a) I would like to give a string to the dll, but how could this be
done. Float, Integers -- everything works, but how about strings:

 Code from Smalltalk:

callWithString: aString

 < api: 'TESTROUTINE' struct short >

 Code from 'C'

#include "objects.h"

...

short _Far16 _Pascal TESTROUTINE( recvr)
struct object * _Far16 recvr;
{   return recvr->header.ObjectSize;
}

 ... but with calling .....

 TestLibrary callWithString: 'Hello'   Smalltalk terminates .. :-(

 Could someone show me an example for this problem?

 b) What is the stuff about the fixed pointers found in "fixdptrs.h"?

 MF


--
Marten Feldtmann                         E-Mail: marten@tpki.toppoint.de
2300 Kiel 14,    Kieler Str. 29,   Tel.: 0431-731916,   FAX: 0431-737677
Re: Q: Using Smalltalk/V-PM and IBM C Set/2
#501
Author: dave
Date: Mon, 27 Jul 1992 14:49
20 lines
1191 bytes
In <712014481snx@feki.toppoint.de> Marten Feldtmann writes:
> I've some problems using IBM C Set/2 and Smalltalk-V/PM together:
>   Code from 'C'
> short _Far16 _Pascal TESTROUTINE( recvr)
> struct object * _Far16 recvr;
> {   return recvr->header.ObjectSize;
> }

That  _Far16 recvr  should probably be  _Seg16 recvr .  And just for
good measure, try writing your prototype as ANSI-style, rather than K&R-
style:

  short _Far16 _Pascal TESTROUTINE( struct object * _Seg16 recvr ) { }

dave

-------------------------------------------------------------------------
Dave Mooney                                              dmm@vnet.ibm.com
 C Set/2 Development, IBM Canada Lab, 844 Don Mills Rd, Toronto, Ontario
            "If you've got a blacklist, I want to be on it"
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