libZPlay documentation (Win32)
IndexReferenceHome
PreviousUpNext
ZPlay Class

Basic libZPlay interface based on ZPlay C++ class.

C++
class ZPlay;

This interface is implemented as ZPlay C++ abstract class and related methods

All you need to do is to create instance of ZPlay class. Interaction with this class is implemented through class methods

Note:
ZPlay class is enclosed into libZPlay namespace. Include this namespace into your project to access ZPlay C++ class interface.
 

 

How to use C++ interface
  • include libZPlay.h into your project
  • include libZplay namespace
  • create instance of ZPlay class
  • use ZPlay methods to play music
  • link your project with dll interface library

 

Note:
You must link your project with dll interface library to access exported functions from libzplay.dll. 

Use interface link library from import_libs directory:

  • Visual C++ - link with libzplay.lib
  • Borland C++ - link with libzplay_borland.lib
  • GNU C++ , MinGW - link with libzplay.a

 

 

To create class instance, user must use class factory function CreateZPlay().

#include "libzplay.h"

// use libZPlay namespace
using namespace libZPlay;

// create class instance using class factory function
ZPlay *instance = CreateZPlay();

 

Note: User can't create instance of ZPlay class using new keyword:

#include "libzplay.h"

// use namespace for our class
using namespace libZPlay;

// create class instance using new keyword
ZPlay *instance = new ZPlay;    // this will fail !!!
// 'ZPlay' : cannot instantiate abstract class due to following members

 

 

When class instance is created, use ZPlay methods to play your songs.

At the end, class instance must be destroyed with Release method:

// destroy class instance
instance->Release();
Copyright (c) 2010. Zoran Cindori - All rights reserved.

Web: http://libzplay.sourceforge.net/

Email: zcindori@inet.hr