I like to thank Prof. Brian Ripley for pointing out this nuance in the error msg that it's not the DLL that could not be found, but the entry point to another DLL which it imports. The suggestion of using DUMPBIN.EXE also helps.
Thanks also goes to Tony Plate for pointing out that .Call(), for which my codes are written, is not portable across releases, not even between 6.1 and 6.2.
Subsequently I discover the source of the problem. A small piece of my codes, just a tiny little funciton, uses a Splus data structure CSPnumericMatrix and makes calls to its class member functions. So it links with sconnect.dll.
When I commented out this function and recompiled, the error disappears. I was then able to attach the S.dll in v7.0 and call my routines just like in 6.2.
But the nagging issue is what's wrong with sconnect.dll? Insightful, could you please answer.
Thanks both.
Horace W. Tso