/* Copyright (c) 2001-2009 by SoftIntegration, Inc. All Rights Reserved */
#include <dlfcn.h> 

int ptfun1_2_setHandle(int i, funcHandle funptr)  { 
  void *fptr;
  int retval;

  fptr = dlsym(_Chptfun_handle, "ptfun1_2_setHandle_chdl");
  if(fptr == NULL)  {
     printf("Error: %s(): dlsym(): %s\n", __func__, dlerror());
     return -1;
  }

  dlrunfun(fptr, &retval, ptfun1_2_setHandle, i, funptr);
  return retval;
}

funcHandle ptfun1_2_getHandle(int i)  {
  void *fptr;
  funcHandle retval;

  fptr = dlsym(_Chptfun_handle, "ptfun1_2_getHandle_chdl");
  if(fptr == NULL)  {
     printf("Error: %s(): dlsym(): %s\n", __func__, dlerror());
     return NULL;
  }

  dlrunfun(fptr, &retval, ptfun1_2_getHandle, i);
  return retval;
}
