Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
945 B

  1. //
  2. // This is a separate file so the dependency on c_dllver is pulled
  3. // in only if the application actually calls CCDllGetVersion.
  4. //
  5. #include "stock.h"
  6. #pragma hdrstop
  7. //
  8. // Common worker function for DllGetVersion. This means we can add
  9. // new DLLVERSIONINFO2, 3, 4... structures and have to fix only one
  10. // function. See ccstock.h for description of usage.
  11. //
  12. extern "C" const DLLVERSIONINFO2 c_dllver;
  13. STDAPI CCDllGetVersion(IN OUT DLLVERSIONINFO * pinfo)
  14. {
  15. HRESULT hres = E_INVALIDARG;
  16. if (pinfo != NULL)
  17. {
  18. if (pinfo->cbSize == sizeof(DLLVERSIONINFO) ||
  19. pinfo->cbSize == sizeof(DLLVERSIONINFO2))
  20. {
  21. CopyMemory((LPBYTE)pinfo + sizeof(pinfo->cbSize),
  22. (LPBYTE)&c_dllver + sizeof(pinfo->cbSize),
  23. pinfo->cbSize - sizeof(pinfo->cbSize));
  24. hres = S_OK;
  25. }
  26. }
  27. return hres;
  28. }