Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygentest.c
Go to the documentation of this file.
00001 #include <stdio.h> 00002 #include <windows.h> 00003 #include <usbdi.h> 00004 00005 typedef ULONG NTAPI 00006 (*USBD_GetInterfaceLengthTYPE)( 00007 PUSB_INTERFACE_DESCRIPTOR InterfaceDescriptor, 00008 PUCHAR BufferEnd 00009 ); 00010 00011 int main() 00012 { 00013 HMODULE Lib; 00014 USB_INTERFACE_DESCRIPTOR InterfaceDescriptor; 00015 USBD_GetInterfaceLengthTYPE USBD_GetInterfaceLength; 00016 00017 InterfaceDescriptor.bLength = 10; 00018 InterfaceDescriptor.bNumEndpoints = 2; 00019 InterfaceDescriptor.bDescriptorType = /*USB_INTERFACE_DESCRIPTOR_TYPE*/2; 00020 InterfaceDescriptor.iInterface = 0x1; 00021 00022 Lib = LoadLibraryEx("usbd.sys", NULL, DONT_RESOLVE_DLL_REFERENCES); 00023 USBD_GetInterfaceLength = (USBD_GetInterfaceLengthTYPE)GetProcAddress(Lib, "USBD_GetInterfaceLength"); 00024 printf("%X\n", USBD_GetInterfaceLength(&InterfaceDescriptor, (PUCHAR)((DWORD)&InterfaceDescriptor + sizeof(InterfaceDescriptor)))); 00025 FreeLibrary(Lib); 00026 00027 Lib = LoadLibraryEx("usbd.ms", NULL, DONT_RESOLVE_DLL_REFERENCES); 00028 USBD_GetInterfaceLength = (USBD_GetInterfaceLengthTYPE)GetProcAddress(Lib, "USBD_GetInterfaceLength"); 00029 printf("%X\n", USBD_GetInterfaceLength(&InterfaceDescriptor, (PUCHAR)((DWORD)&InterfaceDescriptor + sizeof(InterfaceDescriptor)))); 00030 FreeLibrary(Lib); 00031 return 0; 00032 } 00033 Generated on Sun May 27 2012 04:27:59 for ReactOS by
1.7.6.1
|