I assume that by putting a double in a void-pointer, you actually mean: taking the address of the double, then assinging that double-pointer to the void-pointer.
Assigning the double directly to the pointer certainly gives problems in 32-bit applications (double=8 bytes, pointer=4 bytes).
What you can do is to declare a double variable as static within your function. Then return a pointer to that static double variable. However, as soon as somebody else (other thread?) will call the function, the static double will be overwritten and the first caller will lose the value.
The thread-problem can be solved by using thread local storage. In Visual Studio, you can use "declspec(thread)" to make the static variable static-per-thread. But this still doesn't solve the problem if you cannot guarantee that the same thread will call the same function when the first one didn't grab the double value out of the void-pointer yet.
You could consider passing a double reference as argument to the function, and then return a void-pointer to the given reference. That way, the caller provides its own double variable, which the function then fills and returns a pointer to.