Jump to content

Exported DLL Function leaving stuff on stack

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
1 reply to this topic

#1
Ewe Loon

Ewe Loon

    Learning Programmer

  • Members
  • PipPipPip
  • 49 posts
here is a clip from my DLL

#define Export __declspec( dllexport )


Export int NumAddons() 

{

    return 1;

}



PModifier Create(PGrid Grid,int Size);

int Destroy(PModifier mod);

int Modify(PGrid Grid,PModifier mod);


TAddon mir={"Mirror",0x0ffffff0,ATModifier,0,0,Create,Destroy,Modify,NULL,NULL,NULL};

//PanelInfo and ControlInfo arnt used if num panels =0 

//    PMouseFuncs Mouse;


Export PAddon(int n) 

{

	return &mir;

}

NumAddons function works ok
GetAddonInfo function leaves the param passed to it on the stack,
How do i get it to remove its trash off the stack

#2
Ewe Loon

Ewe Loon

    Learning Programmer

  • Members
  • PipPipPip
  • 49 posts
The Problem has been solved by adding "__stdcall" into the function definitions