/* Copyright (c) 2001-2009 by SoftIntegration, Inc. All Rights Reserved */
#ifndef _PTFUN6_H_
#define _PTFUN6_H_

typedef int(*funcHandle)(void *usrMsg);
int setHandle(int index, funcHandle handle, void * usrMsg);
void callFun(int index);

#include <dlfcn.h>
void *_Chsethandle_handle = dlopen("libptfun.dl", RTLD_LAZY);
if(_Chsethandle_handle== NULL) {
   printf("Error: dlopenn(): %s\n", dlerror());
   exit(-1);
} 

/* to close dl */
void _dlclose_sethandle(void) {
   dlclose(_Chsethandle_handle);
}
atexit(_dlclose_sethandle);

#pragma importf "ptfun6.chf"
#endif /* _PTFUN6_H_ */
