Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk 3ds® Max® / SDK / Function Publishing System From One .dlu to another
  RSS 2.0 ATOM  

Function Publishing System From One .dlu to another
Rate this thread
 
33639
 
Permlink of this thread  
avatar
  • Total Posts: 3
  • Joined: 09 May 2008 08:00 AM

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.LinkLM static_cast<Link *>(GetCOREInterface(LINK_INTERFACE_ID))  //OR
2.LinkLM (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



Yogesh Sikri

Replies: 0
avatar
  • Location: West Midlands, England, UK
  • Total Posts: 14447
  • Joined: 06 August 2007 11:06 PM
  • Permlink of this post

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



Max 4.2 through 2013.
XP-64 (SP2)
NVidia 9800GTX-512 (Driver 266.58).
Core 2 Quad Q6600 2.4GHz, 8Gb Ram, DX9.0c.

Replies: 0