Forum > General

How to assign a value to a pointer?

(1/1)

dkjMusic:
I retrieved the following in a Google-search re setting mouse speed:
==================================================
I had the same problem. What M$ thought when they cooked this up is a complete mystery to me. Anyway, the solution:

DWORD iNewSpeed; /* between 0 and 20 */

SystemParametersInfo(SPI_SETMOUSESPEED,0,(void*)iNewSpeed, NULL);

Note the cast to a pointer.. you do not pass a pointer to the variable
(which seems more logical) but you pass the value directly, disguised as a pointer.
==================================================
My question is how do I implement (void*)iNewSpeed in Free Pascal?

taazz:
it is a simple cast, pointer(inewvalue).

dkjMusic:
That worked. Many thanks.

Navigation

[0] Message Index

Go to full version