home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 14 / IOPROG_14.ISO / soft / sdkjava / sdkjava.exe / SDKJava.cab / Samples / JView / jview.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-03-05  |  2.0 KB  |  84 lines

  1. /*
  2.  * jview.h - JView project header file.
  3.  *
  4.  * (C) Copyright 1996-1998, Microsoft Corporation and it suppliers.
  5.  */
  6.  
  7. #ifndef _JVIEW_INCLUDED_
  8. #define _JVIEW_INCLUDED_
  9.  
  10. #define INITGUID 1
  11.  
  12. #include <windows.h>
  13. #include <cguid.h>
  14. #include <stdio.h>
  15. #include <conio.h>
  16. #include <stdarg.h>
  17. #include <string.h>
  18.  
  19. #include <javaexec.h>
  20.  
  21. #include "resource.h"
  22. #include "jview.h"
  23. #include "javaprop.hpp"
  24.  
  25. #define BUFSIZE 512     // A one-size fits all buffer size...
  26.  
  27. // Macros
  28. //------------------------------------------------------------------------------
  29. #define deleteSZ(p) if ((p) != NULL)  \
  30.                     {                 \
  31.                        delete [] (p); \
  32.                        (p) = NULL;    \
  33.                     }
  34.  
  35. class CJView
  36. {
  37. public:
  38.     DWORD m_dwMsgLoopThreadID;
  39.  
  40.     int    m_ac;
  41.     char **m_av;
  42.  
  43.     BOOL      m_fApplet;
  44.     BOOL      m_fPause;
  45.     BOOL      m_fVerify;
  46.     LPSTR     m_pszClassPath;
  47.     LPSTR     m_pszAppend;
  48.     LPSTR     m_pszPrepend;
  49.     LPSTR     m_pszClassName;
  50.     INT       m_iArgs;
  51.     LPOLESTR *m_ppszArgs;
  52.  
  53.     IJavaExecute *m_pJE;
  54.  
  55.     CEnumJAVAPROPERTY *m_pProperties;
  56.  
  57.     void   m_Pause            ();
  58.     void   m_FatalError       (INT idString, ...);
  59.     void   m_FatalErrorHR     (HRESULT hr, INT idString, ...);
  60.     BOOL   m_InitComAndJava   ();
  61.     LPWSTR m_MB2WC            (LPCSTR szAnsi,int cchAnsi = -1);
  62.     LPSTR  m_WC2MB            (LPCWSTR pwsz, int cchWide = -1);
  63.     LPSTR  m_newSZ            (int cBytes);
  64.     BOOL   m_AppendPathString (LPSTR *ppszPath, LPSTR pszAppend);
  65.     void   m_DisplayUsage     ();
  66.     void   m_PreParseSwitches ();
  67.     BOOL   m_ParseSwitches    (int *piArg);
  68.     BOOL   m_ParseParameters  (int iNext);
  69.     void   m_DisplayBanner    ();
  70.  
  71. public:
  72.     CJView(int ac, char **av);
  73.     ~CJView();
  74.  
  75. public:
  76.     BOOL Initialize         ();
  77.     BOOL ParseCommandLine   ();
  78.     HRESULT ExecuteClass    (LPERRORINFO*);
  79.     HRESULT SetSystemProperties();
  80. };
  81.  
  82. #endif //_JVIEW_INCLUDED_
  83.  
  84.