Source code of Windows XP (NT5)
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.

100 lines
2.8 KiB

  1. /*++
  2. * File name:
  3. * perlsmc.h
  4. * Contents:
  5. * Definitions needed by tclntpll.xs
  6. *
  7. * Copyright (C) 1998-1999 Microsoft Corp.
  8. --*/
  9. extern "C" {
  10. void _stdcall SCInit(void *);
  11. char * _stdcall SCConnectA (char *lpszServerName,
  12. char *lpszUserName,
  13. char *lpszPassword,
  14. char *lpszDomain,
  15. int xResolution,
  16. int yResolution,
  17. void **ppConnectData);
  18. char * _stdcall SCConnectExA (
  19. char *lpszServerName,
  20. char *lpszUserName,
  21. char *lpszPassword,
  22. char *lpszDomain,
  23. char *lpszShell,
  24. int xResolution,
  25. int yResolution,
  26. int ConnectionFlags,
  27. void **ppConnectData);
  28. char * _stdcall SCDisconnect (void *pConnectData);
  29. char * _stdcall SCStartA(void *pConnectData, char *command);
  30. char * _stdcall SCLogoff(void *pConnectData);
  31. char * _stdcall SCClipboard(void *pConnectData, int eClipOp, char *lpszFileName);
  32. char * _stdcall SCSaveClipboard(void *pConnectData,
  33. char *szFormatName,
  34. char *FileName);
  35. char * _stdcall SCSenddata(void *pConnectData,
  36. unsigned int uiMessage,
  37. unsigned int wParam,
  38. long lParam);
  39. char * _stdcall SCCheckA(void *pConnectData, char *command, char *param);
  40. char * _stdcall SCSendtextAsMsgsA(void *pConnectData, char *line);
  41. char * GetFeedbackString(void *pConnectData,
  42. char *result,
  43. unsigned int max);
  44. int _stdcall SCIsDead(void *pConnectData);
  45. char * _stdcall SCClientTerminate(void *pConnectData);
  46. void MyBreak(void);
  47. int _stdcall SCOpenClipboard(void *);
  48. int _stdcall SCCloseClipboard(void);
  49. int _stdcall SCGetSessionId(void *);
  50. char * _stdcall SCSaveClientScreen(void *, int, int, int, int, char *);
  51. };
  52. int g_bVerbose = 0;
  53. enum MESSAGETYPE
  54. {
  55. ERROR_MESSAGE,
  56. ALIVE_MESSAGE,
  57. WARNING_MESSAGE,
  58. INFO_MESSAGE
  59. };
  60. void _cdecl LocalPrintMessage(int errlevel, char *format, ...)
  61. {
  62. char szBuffer[256];
  63. char *type;
  64. va_list arglist;
  65. int nchr;
  66. if (g_bVerbose < 2 &&
  67. errlevel == ALIVE_MESSAGE)
  68. goto exitpt;
  69. if (g_bVerbose < 1 &&
  70. errlevel == INFO_MESSAGE)
  71. goto exitpt;
  72. va_start (arglist, format);
  73. nchr = _vsnprintf (szBuffer, sizeof(szBuffer), format, arglist);
  74. va_end (arglist);
  75. switch(errlevel)
  76. {
  77. case INFO_MESSAGE: type = "INF"; break;
  78. case ALIVE_MESSAGE: type = "ALV"; break;
  79. case WARNING_MESSAGE: type = "WRN"; break;
  80. case ERROR_MESSAGE: type = "ERR"; break;
  81. default: type = "UNKNOWN";
  82. }
  83. printf("%s:%s", type, szBuffer);
  84. exitpt:
  85. ;
  86. }