home *** CD-ROM | disk | FTP | other *** search
/ Chip Special: HTML & Java / Chip-Special_1997-01_HTML-a-Java.bin / javasdk / sdk-java.exe / SDKJava.cab / Samples / JView / jview.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-10-10  |  1.9 KB  |  80 lines

  1. /*
  2.  * jview.h - JView project header file.
  3.  *
  4.  * (C) Copyright 1996, 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.  
  24. #define BUFSIZE 512     // A one-size fits all buffer size...
  25.  
  26. // Macros
  27. //------------------------------------------------------------------------------
  28. #define deleteSZ(p) if ((p) != NULL)  \
  29.                     {                 \
  30.                        delete [] (p); \
  31.                        (p) = NULL;    \
  32.                     }
  33.  
  34. class CJView
  35. {
  36. public:
  37.     DWORD m_dwMsgLoopThreadID;
  38.  
  39.     int    m_ac;
  40.     char **m_av;
  41.  
  42.     BOOL      m_fQuiet;
  43.     BOOL      m_fApplet;
  44.     BOOL      m_fPause;
  45.     LPSTR     m_pszClassPath;
  46.     LPSTR     m_pszAppend;
  47.     LPSTR     m_pszPrepend;
  48.     LPSTR     m_pszClassName;
  49.     INT       m_iArgs;
  50.     LPOLESTR *m_ppszArgs;
  51.  
  52.     IJavaExecute *m_pJE;
  53.  
  54.     void   m_Pause            ();
  55.     void   m_FatalError       (INT idString, ...);
  56.     void   m_FatalErrorHR     (HRESULT hr, INT idString, ...);
  57.     BOOL   m_InitComAndJava   ();
  58.     LPWSTR m_MB2WC            (LPCSTR szAnsi,int cchAnsi = -1);
  59.     LPSTR  m_WC2MB            (LPCWSTR pwsz, int cchWide = -1);
  60.     LPSTR  m_newSZ            (int cBytes);
  61.     BOOL   m_AppendPathString (LPSTR *ppszPath, LPSTR pszAppend);
  62.     void   m_DisplayUsage     ();
  63.     void   m_PreParseSwitches ();
  64.     BOOL   m_ParseSwitches    (int *piArg);
  65.     BOOL   m_ParseParameters  (int iNext);
  66.     void   m_DisplayBanner    ();
  67.  
  68. public:
  69.     CJView(int ac, char **av);
  70.     ~CJView();
  71.  
  72. public:
  73.     BOOL Initialize         ();
  74.     BOOL ParseCommandLine   ();
  75.     int  ExecuteClass       ();
  76. };
  77.  
  78. #endif //_JVIEW_INCLUDED_
  79.  
  80.