Re: Using math.h in driver
- From: "Don Burn" <burn@xxxxxxxxxxxxxxxx>
- Date: Tue, 17 Jan 2006 12:15:53 -0500
Answer the first question, why are trying to use floating point in the
kernel at all? Yes you can do it if you are careful to call
KeSaveFloatingPointState and KeRestoreFloatingPointState at the right
places, but there is rarely a good reason to use a floating point value. So
what are you doing that requires this?
--
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Remove StopSpam from the email to reply
"Kee Seng" <wakeup@xxxxxxxxxxxxxxxx> wrote in message
news:OY%23hQj4GGHA.1088@xxxxxxxxxxxxxxxxxxxxxxx
> Hi,
>
> Thanks for the reply. Since the ceil() function is not defined, is it
> possible to define something similar? I'm thinking of using a float to
> long conversion to do it. I remember seeing something about how to set the
> conversion mode that is employed by the system, but cannot really recall
> now. Anyone can help? Or anyone got any other suggestion on how to emulate
> a ceil() function in kernel?
>
> Thanks
>
> KS
>
> "Don Burn" <burn@xxxxxxxxxxxxxxxx> wrote in message
> news:OzJEJM4GGHA.2940@xxxxxxxxxxxxxxxxxxxxxxx
>> First you are trying to use floating point in a driver, this is possible
>> but rarely a great idea. Second, this function is not defined for the
>> kernel, so you cannot use it.
>>
>> Be aware that a number of the include files in the DDK are there for
>> building user space programs only, not for the drivers.
>>
>>
>> --
>> Don Burn (MVP, Windows DDK)
>> Windows 2k/XP/2k3 Filesystem and Driver Consulting
>> Remove StopSpam from the email to reply
>>
>>
>>
>> "Kee Seng" <wakeup@xxxxxxxxxxxxxxxx> wrote in message
>> news:e$e%23dJ4GGHA.2940@xxxxxxxxxxxxxxxxxxxxxxx
>>> Hi,
>>>
>>> I was trying to use the ceil() function defined in <Math.h> in my
>>> driver, and when I compile using DDK 3790.1830, I'm getting an error
>>> which says
>>> error LNK2019: unresolved external symbol __imp__ceil referenced in
>>> function _xxxxxxxxx
>>>
>>> Is there any LIB file or #defines that I need to include before I can
>>> use the ceil() function?
>>>
>>> Thanks
>>>
>>> KS
>>>
>>
>>
>
>
.
- References:
- Using math.h in driver
- From: Kee Seng
- Re: Using math.h in driver
- From: Don Burn
- Re: Using math.h in driver
- From: Kee Seng
- Using math.h in driver
- Prev by Date: Re: Using math.h in driver
- Next by Date: Re: TimeZone Questions
- Previous by thread: Re: Using math.h in driver
- Index(es):
Relevant Pages
|
|