Casting from DOUBLE to LONG

Discussion in 'Windows Vista Drivers' started by apjl, Nov 7, 2005.

  1. apjl

    apjl Guest

    In my kernel-mode code, I need to cast a DOUBLE to a LONG. Both
    explicit and Implicit casting cause a linker (MSVC .NET 2003) error
    "unreferenced external symbol __ftol2...". Even if I'd be able to make
    this work, the conversion might be quite slow to execute. What could be
    the best way to perform this cast?
    apjl, Nov 7, 2005
    1. Advertisements

  2. apjl

    Pavel A. Guest

    1. Do it in user mode
    2. Write your own fast conversion routine, possibly with limited precision.

    By the way - how come that MSVS linker messages appear in a kernel project?
    Use *only* DDK compiler, link and libs.

    Pavel A., Nov 7, 2005
    1. Advertisements

  3. apjl

    SL Guest

    Do not build kernel-mode code with MSVC.
    Or you will never know why system crash even your code look like ok.
    SL, Nov 8, 2005
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.