[comp.windows.ms.programmer] Accessing C functions from a DLL?

nick@aimed.uucp (Nick Pemberton) (05/04/91)

Dumb question time: How can one reliably access functions like sscanf()
and friends from a DLL (ie how to get around the problem of DS != SS)

Can this be done? I really don't want to re-invent the wheel for my
silly little DLL

Thanks,

Nick
-- 
Nick Pemberton  		 uucp: !{lsuc, uunet!mnetor}!aimed!nick
AIM, Inc			  bus: (416) 429-1085
Toronto, Ontario, Canada         Home: (416) 690-0647

Norbert_Unterberg@p4.f36.n245.z2.fidonet.org (Norbert Unterberg) (05/07/91)

 > Dumb question time: How can one reliably access functions like sscanf()
 > and friends from a DLL (ie how to get around the problem of DS != SS)
 >
 > Can this be done? I really don't want to re-invent the wheel for my
 > silly little DLL

Ever seen the functions SwitchStackTo() and SwitchStackBack()? They are 
specially designed for that purpose.

Norbert, 2:245/36.4

kensy@microsoft.UUCP (Ken SYKES) (05/12/91)

The SDK provides libs for this purpose: sdllcaw, sdllcew, etc.  Look for
the ones that have "dll" in them.

--Ken
Disclaimer: The above opinions are solely my own.

Joachim_Kainz@p11.f11.n310.z2.fidonet.org (Joachim Kainz) (05/17/91)

 > [...] SS == DS [...]

MS promised (quite a while ago) to substitude all these functions with new 
ones. The SS==DS-shortcoming should be past then. Borland already uses another 
solution. (Every DLL is linked with CL.LIB automaticly.)