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.

92 lines
1.8 KiB

  1. /*++
  2. Copyright (c) 2000 Microsoft Corporation
  3. Module Name:
  4. oldspapi.c
  5. Abstract:
  6. Stubs for old (depreciated) private API's
  7. Author:
  8. Jamie Hunter (jamiehun) June-12-2000
  9. Revision History:
  10. --*/
  11. #include "precomp.h"
  12. #pragma hdrstop
  13. //
  14. // Memory API's MyMalloc MyFree MyRealloc
  15. //
  16. // these should not be used, however we will support them
  17. // but have them map to LocalXXXX memory API's
  18. //
  19. // This is compatible with SetupGetFileCompressionInfo (argh!)
  20. //
  21. VOID
  22. OldMyFree(
  23. IN PVOID Block
  24. )
  25. {
  26. //
  27. // superceded by pSetupFree,
  28. // published externally for freeing memory allocated by SetupGetFileCompressionInfo
  29. //
  30. LocalFree(Block);
  31. }
  32. PVOID
  33. OldMyMalloc(
  34. IN DWORD Size
  35. )
  36. {
  37. //
  38. // superceded by pSetupMalloc
  39. // we've seen people accidentally or purpously link to this that are also using MyFree
  40. //
  41. return (PVOID)LocalAlloc(LPTR,(SIZE_T)Size);
  42. }
  43. PVOID
  44. OldMyRealloc(
  45. IN PVOID Block,
  46. IN DWORD NewSize
  47. )
  48. {
  49. //
  50. // superceded by pSetupRealloc
  51. // we've seen people accidentally or purpously link to this that are also using MyFree
  52. //
  53. return (PVOID)LocalReAlloc(Block,(SIZE_T)NewSize,0);
  54. }
  55. //
  56. // Good example of people using undercover API's instead of doing this properly
  57. // anyone (eg SQL-SP2) who uses this will get a no-op effect in Whistler+
  58. //
  59. DWORD
  60. OldInstallCatalog(
  61. IN LPCTSTR CatalogFullPath,
  62. IN LPCTSTR NewBaseName, OPTIONAL
  63. OUT LPTSTR NewCatalogFullPath OPTIONAL
  64. )
  65. {
  66. //
  67. // superceded by pSetupInstallCatalog. If anyone calls this expecting to
  68. // be told the catalog full path, they're going to be disappointed...
  69. //
  70. if(NewCatalogFullPath) {
  71. return ERROR_INVALID_PARAMETER;
  72. } else {
  73. return NO_ERROR;
  74. }
  75. }