Working with MS VM
 
 

Microsoft VM     Previous VM  
Invocation Interfaces     Previous VM  

 


Structures

JAVAEXECUTEINFO

typedef struct {
	DWORD     cbSize;
	DWORD     dwFlags;
	LPCOLESTR  pszClassName;
	LPCOLESTR *rgszArgs;
	ULONG     cArgs
	LPCOLESTR pszClassPath
} JAVAEXECUTEINFO, *LPJAVAEXECUTEINFO;

This structure is passed into IJavaExecute::Execute.

ParameterDescription
cbSize Must be set to the size of JAVAEXECUTEINFO in bytes.
dwFlags Can be:
JEIF_VERIFYCLASSES Turn on verification of all classes. By default, the verification setting from the registry will be used.
pszClassName Name of the class to load. The class must have a public method that matches the signature:
public static void main(java.lang.String[]);
rgszArgs Array of Unicode strings. This string is converted to a Java array of strings, which is then passed as the argument to the main method. The cArgs member indicates the number of strings in this array.
cArgs Number of strings in rgszArgs.
pszClassPath Specifies additional class path elements (separated by semicolons). These class path elements will be searched before the elements in the default class path.

This member can be NULL if no additional elements are required.

Remarks:

The class path is a per-process variable. Any extensions made to the class path by means of the Execute method will persist after the Execute method has returned. Therefore, the Execute method is not suitable for use in a shared library.

See Also: IJavaExecute::Execute

JAVAPROPERTY

typedef struct {
	LPOLESTR pszKey;
	LPOLESTR pszValue;
}   JAVAPROPERTY, * LPJAVAPROPERTY;

This structure is used as part of IEnumJAVAPROPERTIES. The pszKey and pszValue members are both allocated using the CoTaskMemAlloc function, and are released by the caller of IEnumJAVAPROPERTIES::Next.

See Also: IEnumJAVAPROPERTIES

JAVACLASSRESOURCEINFO

struct {
	HMODULE   hModule;
	DWORD     dwResourceID;
};

This structure is passed to IJavaExecute::SetClassSource.

ParameterDescription
hModule Handle to the module that contains the resource.
dwResourceID Identifies the resource that contains the class data. The resource must be of type RCDATA.

See JAVACLASSRESOURCE for the format of the resource data.

JAVACLASSRESOURCE

struct {
	DWORD dwSignature;
	DWORD dwNumClasses;
	DWORD dwFormatVersion;
	DWORD dwFlags;
	[Class Information Section]
	[Class Names Section]
	[Class Data Section]
};

ParameterDescription
dwSignature Must be the value 0x43524E44.
dwNumClasses Number of classes contained within this resource.
dwFormatVersion Must be 1.
dwFlags Reserved for future use.

Class Information Section:

The Class Information Section consists of an array of structures that detail the position of each class within the resource. Each class will have one of these structures. The format of this structure is:

struct {
	DWORD dwNameOffset;
	DWORD dwSize;
	DWORD dwDataOffset;
};
dwNameOffset Offset from the beginning of the resource to the class name.
dwSize Size of the class data.
dwDataOffset Offset from the beginning of the resource to the class data.

Class Names Section:

The Class Names Section contains the names of the classes contained in the resource. The names are packed together, back-to-back, so that each name immediately follows the previous name. You must use a slash mark (/) to separate package names, and you must terminate each name with the null character.

Class Data Section:

The Class Data Section contains class file data for each class stored in the resource. The format for each class file is the same as the standard Java binary class file format.

Top © 1998 Microsoft Corporation. All rights reserved. Terms of use.