Util.h File Reference

This reference page is linked to from the following overview topics: Network Rendering.


#include <WTypes.h>
#include "..\strbasic.h"
#include "..\maxnet_types.h"
#include "MaxNetExport.h"

Go to the source code of this file.

Enumerations

enum   MAXNET_PLATFORM { MAXNET_PLATFORM_NATIVE = 0, MAXNET_PLATFORM_32BIT = 32, MAXNET_PLATFORM_64BIT = 64 }

Functions

MAXNETEXPORT MaxNetManager CreateManager ()
MAXNETEXPORT void  DestroyManager (MaxNetManager *mgr)
MAXNETEXPORT bool  jobReadMAXProperties (char *max_filename, Job *job, CJobText &jobText)
MAXNETEXPORT void  jobSetJobDefaults (Job *job)
MAXNETEXPORT void  NumberedFilename (MCHAR *infile, MCHAR *outfile, int number)
MAXNETEXPORT bool  IsMacNull (BYTE *addr)
MAXNETEXPORT bool  GetMacAddress (BYTE *addr)
MAXNETEXPORT bool  MatchMacAddress (BYTE *addr1, BYTE *addr2)
MAXNETEXPORT void  Mac2String (BYTE *addr, MCHAR *string)
MAXNETEXPORT void  Mac2StringCondensed (BYTE *addr, MCHAR *string)
MAXNETEXPORT void  StringCondensed2Mac (MCHAR *string, BYTE *addr)
MAXNETEXPORT void  InitConfigurationInfo (ConfigurationBlock &cb, MCHAR workdisk=0)
MAXNETEXPORT bool  MatchServers (HSERVER srv1, HSERVER srv2)
MAXNETEXPORT bool  Maz (MCHAR *archivename, MCHAR *file_list, DWORD *filesize=0)
MAXNETEXPORT bool  UnMaz (MCHAR *archivename, MCHAR *output_path)
MAXNETEXPORT MCHAR *  ResString (int id, MCHAR *buffer=0)
MAXNETEXPORT bool  ConvertOldJobFile (MCHAR *oldFile, MCHAR *newFile)
MAXNETEXPORT MaxNetManager CreateManager (int platform)
MAXNETEXPORT bool  ConvertOldJobFile (MCHAR *oldFile, MCHAR *newFile, int platform)

Enumeration Type Documentation

Enumerator:
MAXNET_PLATFORM_NATIVE 
MAXNET_PLATFORM_32BIT 
MAXNET_PLATFORM_64BIT 

Definition at line 105 of file Util.h.


Function Documentation

MAXNETEXPORT MaxNetManager* CreateManager ( )
Remarks:
This method will create and return a new instance of the MaxNetManager class.
MAXNETEXPORT void DestroyManager ( MaxNetManager mgr )
Remarks:
This method will destroy an instance of the MaxNetManager class.
Parameters:
MaxNetManager* mgr

Points to the MaxNetManager object to destroy.
MAXNETEXPORT bool jobReadMAXProperties ( char *  max_filename,
Job job,
CJobText jobText 
)
Remarks:
This function will initialize a job structure using the data read from a specified 3ds Max scene file. If you would want to submit a job based on a 3ds Max file alone, you would call this function passing it to the file specified. This function takes care of filling all the fields so you can turn around and just send the job to the queue. An example of this can be found in the SDK under /MAXSDK/SAMPLES/NETRENDER/JOBASSIGN.
Parameters:
char* filename

The filename of the 3ds Max scene file (*.max).

Job* job

A pointer to an empty job structure which will be initialized by the method. Because the function will initialize the structure any values present prior to calling this method will be reset.

CJobText& jobText

A reference to an empty CJobText class which will be initialized by the function. Just like the job structure, any values present prior to calling this function will be reset.
Returns:
TRUE if reading the properties was successful, otherwise FALSE.
MAXNETEXPORT void jobSetJobDefaults ( Job job )
Remarks:
This function will set the default values for the given Job structure. You can use this function to prevent frequent resetting of the structure and its default fields such as size, version, etc.
Parameters:
Job *job

The job structure containing the information about the job. See the Job structure description for an explanation.
MAXNETEXPORT void NumberedFilename ( MCHAR *  infile,
MCHAR *  outfile,
int  number 
)
MAXNETEXPORT bool IsMacNull ( BYTE *  addr )
MAXNETEXPORT bool GetMacAddress ( BYTE *  addr )
MAXNETEXPORT bool MatchMacAddress ( BYTE *  addr1,
BYTE *  addr2 
)
MAXNETEXPORT void Mac2String ( BYTE *  addr,
MCHAR *  string 
)
MAXNETEXPORT void Mac2StringCondensed ( BYTE *  addr,
MCHAR *  string 
)
MAXNETEXPORT void StringCondensed2Mac ( MCHAR *  string,
BYTE *  addr 
)
MAXNETEXPORT void InitConfigurationInfo ( ConfigurationBlock cb,
MCHAR  workdisk = 0 
)
MAXNETEXPORT bool MatchServers ( HSERVER  srv1,
HSERVER  srv2 
)
MAXNETEXPORT bool Maz ( MCHAR *  archivename,
MCHAR *  file_list,
DWORD *  filesize = 0 
)
Remarks:
This function creates a Network Rendering archive. This is the archive sent to the manager when submitting a new job. Note that even though you can use whatever name you feel like, the Manager and Servers will look for a "jobname.maz" file.
Parameters:
MCHAR* archivename

The full path and filename of the archive you want to create.

MCHAR* file_list

A list of NULL terminated filenames to include in the archive. You should provide a full path and filename. However, only the file names will be saved in the archive and all files are going to be un-archived in the same directory.

An example: file_list[] = {"c:\\path\\file.maz/0c:\\anotherpath\\maps.tga/0/0"};

DWORD* filesize

Optional pointer to a variable to receive the accumulated size of all files included in the archive. This is the "uncompressed" size. You can use this to compute the disk space necessary to uncompress the archive.
Returns:
TRUE if the archive was successfully created, otherwise FALSE.
MAXNETEXPORT bool UnMaz ( MCHAR *  archivename,
MCHAR *  output_path 
)
Remarks:
This function is the opposite of Maz() and will un-archive the given archive into the specified directory.
Parameters:
MCHAR* archivename

The full path and filename of the archive you want to un-archive.

MCHAR* output_path

The path you want the files extracted to.
Returns:
TRUE if the archive was successfully extracted, otherwise FALSE.
MAXNETEXPORT MCHAR* ResString ( int  id,
MCHAR *  buffer = 0 
)
MAXNETEXPORT bool ConvertOldJobFile ( MCHAR *  oldFile,
MCHAR *  newFile 
)
MAXNETEXPORT MaxNetManager* CreateManager ( int  platform )
MAXNETEXPORT bool ConvertOldJobFile ( MCHAR *  oldFile,
MCHAR *  newFile,
int  platform 
)