Function Publishing System From One .dlu to another

Function Publishing System From One .dlu to another

Anonymous
Not applicable
232 Views
1 Reply
Message 1 of 2

Function Publishing System From One .dlu to another

Anonymous
Not applicable
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:

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
0 Likes
233 Views
1 Reply
Reply (1)
Message 2 of 2

Steve_Curley
Mentor
Mentor
Moved to the SDK forum. You will get better responses by posting in the most appropriate forum.

Max 2016 (SP1/EXT1)
Win7Pro x64 (SP1). i5-3570K @ 4.4GHz, 8Gb Ram, DX11.
nVidia GTX760 (2GB) (Driver 430.86).

0 Likes