comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » idl dlm
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
idl dlm [message #36581] Wed, 08 October 2003 09:55
wroozee is currently offline  wroozee
Messages: 2
Registered: October 2003
Junior Member
hi, i'm new to IDL, so this might be a basic question for all IDL
experts. Any help is greatly appreciated.

I have this .cpp file and i need to call the functions in this file
from IDL.

.cpp file
----------------

#include "ESML.h"
#include "idl_export.h"


void * ESML_CreateObj(const std::string & esmlFile,const std::string &
dataFile)
{
return((void *)new ESML(esmlFile,dataFile));
}

void ESML_DeleteObj(void * esmlObj)
{
delete((ESML *)esmlObj);
}

int IDL_Load(void)
{
/*
* These tables contain information on the functions and procedures
* that make up the TESTMODULE DLM. The information contained in
these
* tables must be identical to that contained in testmodule.dlm.
*/
static IDL_SYSFUN_DEF2 function_addr[] = {
{ (IDL_SYSRTN_GENERIC) ESML_CreateObj, "ESML_CREATEOBJ", 2, 2, 0,
0},
{ (IDL_SYSRTN_GENERIC) ESML_DeleteObj, "ESML_DELETEOBJ", 1, 1, 0,
0}
};


/*
* Register our routine. The routines must be specified exactly the
same
* as in testmodule.dlm.
*/
return IDL_SysRtnAdd(function_addr, IDL_TRUE,
IDL_CARRAY_ELTS(function_addr));
}


.dlm file
-----------------

MODULE esml
DESCRIPTION Test code for loadable modules
VERSION 1.0
SOURCE Research Systems, Inc.
BUILD_DATE OCT 8 2003
FUNCTION ESML_CREATEOBJ 2 2
FUNCTION ESML_DELETEOBJ 1 1


.def file
----------------
LIBRARY esml
DESCRIPTION 'Demonstrates use of IDL Dynamic Loadable Modules'

EXPORTS IDL_Load @1


Thanks,
Wroozee
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: IDL Student Edition 'splash' screen
Next Topic: Re: idl dlm

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Thu Oct 09 19:31:56 PDT 2025

Total time taken to generate the page: 2.32153 seconds