Duda, mezclando cabeceras nativas

Iniciado por x64core, 17 Febrero 2012, 01:10 AM

0 Miembros y 2 Visitantes están viendo este tema.

x64core

Bueno estoy usando APIs nativas para un proyecto, busque el archivo ntdll.h y lo encontre suelto... pero
de otro momento me descargare el WDK porque segun tengo entendido ahí se encuentran las cabeceras oficiles y
bueno mi pregunta es sencilla acaso no se puede "mezclar" cabeceras como ntdll.h, Winternl.h, y entre otros ?

Eternal Idol

¿ntdll.h? Eso no es oficial, la mejor manera de trabajar es declarando las estructuras y enumeraciones y usando enlazado dinamico en tiempo de ejecucion (en este caso GetModuleHandle + GetProcAddress). Podes usar winternl.h pero creo que no tiene todo, simplemente defini lo que no este ahi en alguna otra cabecera ...


Calling Internal APIs

The Winternl.h header file exposes prototypes of internal Windows APIs. There is no associated import library, so developers must use run-time dynamic linking to call the functions described in this header file.

The functions and structures in Winternl.h are internal to the operating system and subject to change from one release of Windows to the next, and possibly even between service packs for each release. To maintain the compatibility of your application, you should use the equivalent public functions instead. Further information is available in the header file, Winternl.h, and the documentation for each function.

If you do use these functions, you can access them through run-time dynamic linking using LoadLibrary and GetProcAddress. This gives your code an opportunity to respond gracefully if the function has been changed or removed from the operating system. Signature changes, however, may not be detectable.
La economía nunca ha sido libre: o la controla el Estado en beneficio del Pueblo o lo hacen los grandes consorcios en perjuicio de éste.
Juan Domingo Perón

x64core

Ya!  :) Gracias EI, no sabia eso, hare eso que dices no me queda de mas, thanks!

Eternal Idol

La economía nunca ha sido libre: o la controla el Estado en beneficio del Pueblo o lo hacen los grandes consorcios en perjuicio de éste.
Juan Domingo Perón