Message 1 of 2
Function Publishing System From One .dlu to another

Not applicable
08-26-2009
04:39 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello All,
I m creating a dlu in which i m using function Publishing system.i want to use that function in another dlu But I m not able to get the Interface from first dlu in second dlu.
Can anyOne Help me to sort out this?
I m also providing the sample code below:
m i doing right or something is missing?
Thanks in Advance.
Regards
Yogesh
I m creating a dlu in which i m using function Publishing system.i want to use that function in another dlu But I m not able to get the Interface from first dlu in second dlu.
Can anyOne Help me to sort out this?
I m also providing the sample code below:
First maxproject1.DLU
#define LINK_INTERFACE_ID Interface_ID(0x4a7a4ca8, 0xc8804dc)
#define GetILink(cd) \
(Link *)(cd)->GetInterface(LINK_INTERFACE_ID)
class Link:public FPStaticInterface
{
public:
virtual bool callMe()=0;
enum{fnIdAction1};
};
class LinkAgain:public Link
{
public:
bool callMe()
DECLARE_DESCRIPTOR(LinkAgain) //Needed for static interfaces
BEGIN_FUNCTION_MAP
FN_ACTION( fnIdAction1,callMe)
END_FUNCTION_MAP
};
Second dluTest.DLU
Here I m trying on button event to get that Interface.
I tried with too many option to get the Interface so I m providing all the ways that I did:
1.Link* LM = static_cast<Link *>(GetCOREInterface(LINK_INTERFACE_ID)) //OR
2.Link* LM = (Link*)GetCOREInterface(LINK_INTERFACE_ID) //OR
if(LM == NULL)
return true;
bool status=LM->callMe()
m i doing right or something is missing?
Thanks in Advance.
Regards
Yogesh