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

typedef void(*funcHandle)();
void ptfun1_1_setHandle(funcHandle funptr);
funcHandle ptfun1_1_getHandle();

/* below is added only for Ch */
#include <dlfcn.h>
void *_Chptfun_handle = dlopen("libptfun.dl", RTLD_LAZY);
if(_Chptfun_handle== NULL) {
   printf("Error: %s(): dlopen(): %s\n", __func__, dlerror());
   exit(-1);
} 

/* user-defined function which is called to close DLL 
   when the program exits */
void _dlclose_ptfun1_1(void) {
   dlclose(_Chptfun_handle);
}
atexit(_dlclose_ptfun1_1);

#pragma importf <ptfun1_1.chf>
#endif /* _PTFUN1_1_H_ */
