View Single Post
  #35   Report Post  
Posted to microsoft.public.excel,microsoft.public.excel.programming
joeu2004[_2_] joeu2004[_2_] is offline
external usenet poster
 
Posts: 829
Default Excel and the Math Coprocessor for DLLs

"Lynn McGuire" wrote:
Been busy today.
There is no XLS file in the lynntest ZIP file.
Did you want me to use my own XLS file modified ?


Good to hear that you will try that eventually.

To be on the safe side, simply open a new Excel instance, then import
lynntest.bas into VBA.

Note that you must first the correct Lib path "C:\yourPathTo" after
importing lynntest.bas. (Or you could edit lynntest.bas using Notepad.)

You will need to execute the VBA "doit" procedure manually by putting the
cursor somewhere in the procedure, then pressing F5.

Alternatively, you could set up an Excel "button", if you prefer.

Execute "doit" twice.

The first time should demonstrate the chptst computation with VBA's FPU
settings, presumably _PC_64 + _RC_NEAR.

The second time should demonstrate the chptst computation with the FPU
setting altered by the previous execution.

Note: Do not change the setMathCoprocessorStatus routine. I left a lot
#elif directives to make it easy to experiment with your mistakes of the
past. But in hindsight, we are only interested in how _control87(_PC_53,
_MCW_PC) behaves in your environment.

If your initial results do not match my expectations (see a previous
response), change _control87 to _controlfp in all places.