Example #1
0
File: adsx.c Project: SBCamus/core
static void adsxRegisterRDD( HB_USHORT * pusRddId, const char * szRddName )
{
   RDDFUNCS * pTable;
   HB_USHORT * puiCount, * puiSuperRddId, uiRddId;

   puiCount = ( HB_USHORT * ) hb_parptr( 1 );
   pTable = ( RDDFUNCS * ) hb_parptr( 2 );
   uiRddId = ( HB_USHORT ) hb_parni( 4 );
   puiSuperRddId = ( HB_USHORT * ) hb_parptr( 5 );

   if( pTable )
   {
      HB_ERRCODE errCode;

      if( puiCount )
         *puiCount = RDDFUNCSCOUNT;

      errCode = hb_rddInheritEx( pTable, &adsxTable, &adsxSuper, szRddName, puiSuperRddId );
      if( errCode == HB_SUCCESS )
      {
         *pusRddId = uiRddId;
      }
      hb_retni( errCode );
   }
   else
   {
      hb_retni( HB_FAILURE );
   }
}
Example #2
0
static void hb_PEM_read_bio( PEM_READ_BIO * func )
{
   BIO * bio;

   if( HB_ISPOINTER( 1 ) )
      bio = ( BIO * ) hb_parptr( 1 );
   else if( HB_ISCHAR( 1 ) )
      bio = BIO_new_file( hb_parc( 1 ), "r" );
   else if( HB_ISNUM( 1 ) )
      bio = BIO_new_fd( hb_parni( 1 ), BIO_NOCLOSE );
   else
      bio = NULL;

   if( bio )
   {
      PHB_ITEM pPassCallback = hb_param( 2, HB_IT_BLOCK | HB_IT_SYMBOL );

      if( pPassCallback )
      {
         hb_retptr( ( *func )( bio, NULL, hb_ssl_pem_password_cb, pPassCallback ) );
      }
      else
      {
         /* NOTE: Dropping 'const' qualifier. [vszakats] */
         hb_retptr( ( *func )( bio, NULL, NULL, ( void * ) hb_parc( 2 ) ) );
      }

      if( ! HB_ISPOINTER( 1 ) )
         BIO_free( bio );
   }
   else
      hb_errRT_BASE( EG_ARG, 2010, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
Example #3
0
File: bio.c Project: CsBela/core
BIO * hb_BIO_par( int iParam )
{
   return ( BIO * ) hb_parptr( iParam );
}
Example #4
0
File: bio.c Project: CsBela/core
void * hb_BIO_is( int iParam )
{
   return hb_parptr( iParam );
}