Fixed HANDLE prototype and added some tyepdefs.