Home |
RTTarget-32 Programming Manual Function RTSetVersionExA Function RTSetDLLNameTranslation System Management BIOS (SMBIOS) Advanced Programmable Interrupt Controller (APIC) |
Function RTSetVersionExAFunction RTSetVersionExA can be used to define how On Time RTOS-32 should identify itselfs through Win32 API functions GetVersion, GetVersionExA, GetVersionExW, and RtlGetNtVersionNumbers. void RTSetVersionExA(const OSVERSIONINFOA * lpVersionInformation); ParameterslpVersionInformationPointer to a Win32 version information structure to be returned in future calls to GetVersion, GetVersionExA, GetVersionExW, and RtlGetNtVersionNumbers. This function can be useful when third-party software components expect to be executed under a specific Windows version. For example, Msvcrt.dll will only load if the OS identifies itself with the version the file stems from. Here is an example Init function which could be used to enable Msvcrt.dll from Windows 7 to be used: extern "C" __declspec(dllexport) void Init(void) { OSVERSIONINFO Version; GetVersionExA(&Version); // Init structure Version Version.dwMajorVersion = 6; // Win2k: 5, XP: 5, Vista: 6, Win7: 6, Win8: 6 Version.dwMinorVersion = 1; // Win2k: 0, XP: 1, Vista: 0, Win7: 1, Win8: 2 RTSetVersionExA(&Version); RTCMOSExtendHeap(); RTCMOSSetSystemTime(); } Function RTSetDLLNameTranslation
|