Servertec
Foundation Classes
1.3.3 09/04/2005

stec.sfc.Win32
Class Win32Message

java.lang.Object
  extended by stec.sfc.Win32.Win32Message

public final class Win32Message
extends java.lang.Object

Used to process Win32 Messages.

Since:
1.3.1 09/07/2004

Constructor Summary
Win32Message()
           
 
Method Summary
static void closeMessageFile(int handle)
          Closes the specified message file handle.
static java.lang.String FormatMessage(int handle, int message_id)
          Returns the formatted message using the specified message file handle and message identifier.
static java.lang.String FormatMessage(int handle, int message_id, int language_id)
          Returns the formatted message using the specified message file handle, message identifier and language identifier.
static java.lang.String FormatMessage(int handle, int message_id, int language_id, java.lang.String[] parameters)
          Returns the formatted message using the specified message file handle, message identifier, language identifier and parameters.
static java.lang.String FormatMessage(int handle, int message_id, int language_id, java.lang.String[] parameters, boolean default_to_system)
          Returns the formatted message using the specified message file handle, message identifier, language identifier and parameters.
static java.lang.String FormatMessage(java.lang.String message_source, java.lang.String[] parameters)
          Returns the formatted message for the specified message source and using the given parameters.
static java.lang.String[] FormatParameters(int handle, java.lang.String[] parameters)
          Returns an array formatted parameters from the specified array of parameters using the specified message file handle.
static java.lang.String[] FormatParameters(int handle, java.lang.String[] parameters, int language_id)
          Returns an array formatted parameters from the specified array of parameters using the specified message file handle and language identifier.
static java.lang.String[] FormatParameters(int handle, java.lang.String[] parameters, int language_id, boolean default_to_system)
          Returns an array formatted parameters from the specified array of parameters using the specified message file handle and language identifier.
static java.lang.String FormatSystemMessage(int message_id)
          Returns the formatted system message using the specified message identifier.
static java.lang.String FormatSystemMessage(int message_id, int language_id)
          Returns the formatted system message using the specified message identifier and language identifier.
static java.lang.String FormatSystemMessage(int message_id, int language_id, java.lang.String[] parameters)
          Returns the formatted system message using the specified message identifier, language identifier and parameters.
static java.lang.String[] FormatSystemParameters(java.lang.String[] parameters)
          Returns an array formatted system parameters from the specified array of parameters.
static java.lang.String[] FormatSystemParameters(java.lang.String[] parameters, int language_id)
          Returns an array formatted system parameters from the specified array of parameters and language identifier.
static int openMessageFile(java.lang.String filename)
          Returns a handle to the specified message file.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Win32Message

public Win32Message()
Method Detail

openMessageFile

public static final int openMessageFile(java.lang.String filename)
                                 throws Win32Exception
Returns a handle to the specified message file.

closeMessageFile() must be called when done.

Parameters:
filename - the name of the message file to open. Normally a dll file.
Returns:
a handle to the specified message file.
Throws:
Win32Exception - if any error occurs.
See Also:
closeMessageFile(int)

closeMessageFile

public static final void closeMessageFile(int handle)
                                   throws Win32Exception
Closes the specified message file handle.

Parameters:
handle - the handle.
Throws:
Win32Exception - if any error occurs.

FormatMessage

public static final java.lang.String FormatMessage(java.lang.String message_source,
                                                   java.lang.String[] parameters)
                                            throws Win32Exception
Returns the formatted message for the specified message source and using the given parameters.

Parameters:
message_source - the message source.
parameters - any array of strings containing parameters.
Returns:
the formatted message.
Throws:
Win32Exception - if any error occurs.

FormatMessage

public static final java.lang.String FormatMessage(int handle,
                                                   int message_id,
                                                   int language_id,
                                                   java.lang.String[] parameters,
                                                   boolean default_to_system)
                                            throws Win32Exception
Returns the formatted message using the specified message file handle, message identifier, language identifier and parameters.

Parameters:
handle - the message file handle.
message_id - the message identifier.
language_id - the language identifier. 0 for language neutral.
parameters - an array of Strings with one or more parameters.
default_to_system - whether to use system message if message identifier cannot be found.
Returns:
the formatted message.
Throws:
Win32Exception - if any error occurs.

FormatMessage

public static final java.lang.String FormatMessage(int handle,
                                                   int message_id,
                                                   int language_id,
                                                   java.lang.String[] parameters)
                                            throws Win32Exception
Returns the formatted message using the specified message file handle, message identifier, language identifier and parameters.

Parameters:
handle - the message file handle.
message_id - the message identifier.
language_id - the language identifier. 0 for language neutral.
parameters - an array of Strings with one or more parameters.
Returns:
the formatted message.
Throws:
Win32Exception - if any error occurs.

FormatMessage

public static final java.lang.String FormatMessage(int handle,
                                                   int message_id,
                                                   int language_id)
                                            throws Win32Exception
Returns the formatted message using the specified message file handle, message identifier and language identifier.

Parameters:
handle - the message file handle.
message_id - the message identifier.
language_id - the language identifier. 0 for language neutral.
Returns:
the formatted message.
Throws:
Win32Exception - if any error occurs.

FormatMessage

public static final java.lang.String FormatMessage(int handle,
                                                   int message_id)
                                            throws Win32Exception
Returns the formatted message using the specified message file handle and message identifier.

Parameters:
handle - the message file handle.
message_id - the message identifier.
Returns:
the formatted message.
Throws:
Win32Exception - if any error occurs.

FormatSystemMessage

public static final java.lang.String FormatSystemMessage(int message_id,
                                                         int language_id,
                                                         java.lang.String[] parameters)
                                                  throws Win32Exception
Returns the formatted system message using the specified message identifier, language identifier and parameters.

Parameters:
message_id - the system message identifier.
language_id - the language identifier. 0 for language neutral.
parameters - an array of Strings with one or more parameters.
Returns:
the formatted system message.
Throws:
Win32Exception - if any error occurs.

FormatSystemMessage

public static final java.lang.String FormatSystemMessage(int message_id,
                                                         int language_id)
                                                  throws Win32Exception
Returns the formatted system message using the specified message identifier and language identifier.

Parameters:
message_id - the system message identifier.
language_id - the language identifier. 0 for language neutral.
Returns:
the formatted system message.
Throws:
Win32Exception - if any error occurs.

FormatSystemMessage

public static final java.lang.String FormatSystemMessage(int message_id)
                                                  throws Win32Exception
Returns the formatted system message using the specified message identifier.

Parameters:
message_id - the system message identifier.
Returns:
the formatted system message.
Throws:
Win32Exception - if any error occurs.

FormatParameters

public static final java.lang.String[] FormatParameters(int handle,
                                                        java.lang.String[] parameters,
                                                        int language_id,
                                                        boolean default_to_system)
                                                 throws Win32Exception
Returns an array formatted parameters from the specified array of parameters using the specified message file handle and language identifier.

Parameters:
handle - the message file handle.
parameters - the array of parameters to format.
language_id - the language identifier. 0 for language neutral.
default_to_system - whether to use system message if parameter identifier cannot be found.
Returns:
the formatted parameters.
Throws:
Win32Exception - if any error occurs.

FormatParameters

public static final java.lang.String[] FormatParameters(int handle,
                                                        java.lang.String[] parameters,
                                                        int language_id)
                                                 throws Win32Exception
Returns an array formatted parameters from the specified array of parameters using the specified message file handle and language identifier.

Parameters:
handle - the message file handle.
parameters - the array of parameters to format.
language_id - the language identifier. 0 for language neutral.
Returns:
the formatted parameters.
Throws:
Win32Exception - if any error occurs.

FormatParameters

public static final java.lang.String[] FormatParameters(int handle,
                                                        java.lang.String[] parameters)
                                                 throws Win32Exception
Returns an array formatted parameters from the specified array of parameters using the specified message file handle.

Parameters:
handle - the message file handle.
parameters - the array of parameters to format.
Returns:
the formatted parameters.
Throws:
Win32Exception - if any error occurs.

FormatSystemParameters

public static final java.lang.String[] FormatSystemParameters(java.lang.String[] parameters,
                                                              int language_id)
                                                       throws Win32Exception
Returns an array formatted system parameters from the specified array of parameters and language identifier.

Parameters:
parameters - the array of system parameters to format.
language_id - the language identifier. 0 for language neutral.
Returns:
the formatted system parameters.
Throws:
Win32Exception - if any error occurs.

FormatSystemParameters

public static final java.lang.String[] FormatSystemParameters(java.lang.String[] parameters)
                                                       throws Win32Exception
Returns an array formatted system parameters from the specified array of parameters.

Parameters:
parameters - the array of system parameters to format.
Returns:
the formatted system parameters.
Throws:
Win32Exception - if any error occurs.

Servertec
Foundation Classes
1.3.3 09/04/2005

Copyright © 2001-2005 Servertec. All rights reserved.