| Piers Daniell | 886be47 | 2015-02-23 16:23:13 -0700 | [diff] [blame] | 1 | /* See: http://msdn.microsoft.com/library/en-us/shellcc/platform/shell/programmersguide/versions.asp */ |
| 2 | #include <windows.h> |
| 3 | #include <shlwapi.h> |
| 4 | #ifdef __cplusplus |
| 5 | extern "C" { |
| 6 | #endif |
| 7 | /* __declspec(dllexport) */ HRESULT DllGetVersion (DLLVERSIONINFO2 *pdvi); |
| 8 | #ifdef __cplusplus |
| 9 | } |
| 10 | #endif |
| 11 | |
| 12 | HRESULT DllGetVersion (DLLVERSIONINFO2 *pdvi) |
| 13 | { |
| 14 | if ( !pdvi || (pdvi->info1.cbSize != sizeof (*pdvi)) ) |
| 15 | return (E_INVALIDARG); |
| 16 | pdvi->info1.dwMajorVersion = 1; |
| 17 | pdvi->info1.dwMinorVersion = 2; |
| 18 | pdvi->info1.dwBuildNumber = 3; |
| 19 | pdvi->info1.dwPlatformID = DLLVER_PLATFORM_WINDOWS; |
| 20 | if (pdvi->info1.cbSize == sizeof (DLLVERSIONINFO2)) |
| 21 | pdvi->ullVersion = MAKEDLLVERULL (1, 2, 3, 2027); |
| 22 | return S_OK; |
| 23 | } |