# DefineClass

Defines a class of objects.

### Synopsis

`int32 DefineClass( COBClass *Class, COBClass *SuperClass,int32 DataSize )`

### Description

Currently, this call is for internal use only, and not available to user tasks.

This function is part of the Juggler object-oriented toolbox that supports the various classes of Juggler objects. This function defines a new class of objects with the given size. All methods for this class are inherited from the specified SuperClass. New methods are added to the class by setting function pointers in the Class structure.

See the chapter "Playing Juggler Objects" in the Portfolio Programmer's Guide for more information about object-oriented programming and the data structures necessary for this function.

### Arguments

Class
  A pointer to the COBClass data structure for the class.

SuperClass
  A pointer to the COBClass data structure for the superclass.

DataSize
  A value indicating the size of the new class.

### Return Value

This function returns 0 if successful or an error code (a negative value) if an error occurs.

### Implementation

Library call implemented in music.lib V20.

### Associated Files

cobj.h, music.lib

### See Also

``CreateObject`(), DestroyObject(), ValidateObject()`