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 / jexegen / stub / stub.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-10-10  |  1.5 KB  |  71 lines

  1. /*
  2.  * stub.h
  3.  *
  4.  * (C) Copyright 1996, Microsoft Corporation and it suppliers.
  5.  */
  6.  
  7. #ifndef _EXEGENSTUB_INCLUDED_
  8. #define _EXEGENSTUB_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 "..\..\..\include\javaexec.h"
  20.  
  21. #include "resource.h"
  22.  
  23. #define   BUFSIZE 512     // A one-size fits all buffer size...
  24.  
  25. //
  26. // Macros
  27. //
  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.     LPSTR     m_pszClassName;
  44.     INT       m_iArgs;
  45.     LPOLESTR *m_ppszArgs;
  46.  
  47.     IJavaExecute2 *m_pJE;
  48.  
  49.     void   m_FatalError       (INT idString, ...);
  50.     void   m_FatalErrorHR     (HRESULT hr, INT idString, ...);
  51.     BOOL   m_InitComAndJava   ();
  52.     LPWSTR m_MB2WC            (LPCSTR szAnsi,int cchAnsi = -1);
  53.     LPSTR  m_WC2MB            (LPCWSTR pwsz, int cchWide = -1);
  54.     LPSTR  m_newSZ            (int cBytes);
  55.     BOOL   m_ParseParameters  ();
  56.  
  57.     BOOL   LoadDataResource( DWORD dwResID, BYTE *pBuffer, DWORD *pdwSize );
  58.  
  59. public:
  60.     CJView(int ac, char **av);
  61.     ~CJView();
  62.  
  63. public:
  64.     BOOL Initialize         ();
  65.     BOOL ParseCommandLine   ();
  66.     int  ExecuteClass       ();
  67. };
  68.  
  69. #endif //_EXEGENSTUB_INCLUDED_
  70.  
  71.