Ver Mensaje Individual
  #2  
Antiguo 25-09-2015
Avatar de dec
dec dec is offline
Moderador
 
Registrado: dic 2004
Ubicación: Alcobendas, Madrid, España
Posts: 13.142
Reputación: 36
dec Tiene un aura espectaculardec Tiene un aura espectacular
Hola,

Tomado de aquí: http://www.angelfire.com/hi5/delphizeus/lifts.html

Cita:
VOID, PVOID, LPVOID, What is a Void?

You will see the VOID in a parameter or Return (Result) of an API function. There is no Pascal substitute for VOID, it roughly means "Nothing is here". The API says this about it - The base type VOID indicates a procedure with no arguments or a function that does not return a result value (a procedure in Pascal).

The pointer types of PVOID, LPVOID and LPCVOID are for the C-Code Non-Typed pointers, which is the Delphi Pascal Pointer type (non-typed pointer).

Let's look at the API definition for the ZeroMemory( ) function -

Código:
VOID ZeroMemory(
   PVOID Destination,
   DWORD Length  
   );
and the windows.pas Pascal definition -

Código Delphi [-]
procedure ZeroMemory(
   Destination: Pointer;
   Length: Cardinal
   );

In Pascal this function becomes a Procedure, because the Return in C-Code is VOID. And the "Destination" is a Pascal "Pointer" type.
Según lo entiendo puedes usar "Pointer" o definir "PVOID" como tal.
__________________
David Esperalta
www.decsoftutils.com
Responder Con Cita