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.

98 lines
3.0 KiB

  1. // Copyright (c) 1993-1999 Microsoft Corporation
  2. #pragma warning ( disable : 4514 4710 )
  3. #include <stdio.h>
  4. #include "cmdana.hxx"
  5. extern CMD_ARG* pCommand;
  6. /*
  7. put the following lines in rpcndr.h
  8. // MIDL 3.03.98
  9. #define __RPCNDR_H_VERSION__ 440
  10. #ifdef __REQUIRED_RPCNDR_H_VERSION__
  11. #if ( __RPCNDR_H_VERSION__ < __REQUIRED_RPCNDR_H_VERSION__ )
  12. #error incorrect <rpcndr.h> version. Use the header that matches with the MIDL compiler.
  13. #endif
  14. #endif // __REQUIRED_RPCNDR_H_VERSION__
  15. put the following lines in rpcproxy.h
  16. // MIDL 3.03.98
  17. #define __RPCPROXY_H_VERSION__ 440
  18. #ifdef __REQUIRED_RPCPROXY_H_VERSION__
  19. #if ( __RPCPROXY_H_VERSION__ < __REQUIRED_RPCPROXY_H_VERSION__ )
  20. #error incorrect <rpcproxy.h> version. Use the header that matches with the MIDL compiler.
  21. #endif
  22. #endif // __REQUIRED_RPCPROXY_H_VERSION__
  23. */
  24. #define RPC_HEADERS_VERSION "/* verify that the %s version is high enough to compile this file*/\n" \
  25. "#ifndef %s\n#define %s %d\n#endif\n\n"
  26. char*
  27. GetRpcNdrHVersionGuard( char* szVer )
  28. {
  29. unsigned long ulVersion = 440;
  30. *szVer = 0;
  31. if ( !pCommand->IsSwitchDefined( SWITCH_VERSION_STAMP ) )
  32. {
  33. if ( pCommand->GetNdrVersionControl().HasNdr50Feature() )
  34. {
  35. if (pCommand->GetNdrVersionControl().HasAsyncUUID() ||
  36. pCommand->GetNdrVersionControl().HasDOA() ||
  37. pCommand->GetNdrVersionControl().HasContextSerialization() ||
  38. pCommand->GetNdrVersionControl().HasInterpretedNotify() )
  39. {
  40. ulVersion = 475;
  41. }
  42. else
  43. {
  44. ulVersion = 450;
  45. }
  46. }
  47. sprintf( szVer, RPC_HEADERS_VERSION, "<rpcndr.h>",
  48. "__REQUIRED_RPCNDR_H_VERSION__", "__REQUIRED_RPCNDR_H_VERSION__", ulVersion );
  49. }
  50. return szVer;
  51. }
  52. char*
  53. GetRpcProxyHVersionGuard( char* szVer )
  54. {
  55. unsigned long ulVersion = 440;
  56. *szVer = 0;
  57. if ( !pCommand->IsSwitchDefined( SWITCH_VERSION_STAMP ) )
  58. {
  59. if ( pCommand->GetNdrVersionControl().HasNdr50Feature() )
  60. {
  61. if (pCommand->GetNdrVersionControl().HasAsyncUUID() ||
  62. pCommand->GetNdrVersionControl().HasDOA() ||
  63. pCommand->GetNdrVersionControl().HasContextSerialization() ||
  64. pCommand->GetNdrVersionControl().HasInterpretedNotify() )
  65. {
  66. ulVersion = 475;
  67. }
  68. else
  69. {
  70. ulVersion = 450;
  71. }
  72. }
  73. sprintf( szVer, RPC_HEADERS_VERSION, "<rpcproxy.h>",
  74. "__REDQ_RPCPROXY_H_VERSION__", "__REQUIRED_RPCPROXY_H_VERSION__", ulVersion );
  75. }
  76. return szVer;
  77. }
  78. void
  79. MidlSleep( int sec )
  80. {
  81. _sleep( 1000 * sec );
  82. }