|
![](/i/fill.gif) |
I'm am currently working on a GUI Extension for our senior design
project. I'm having a problem with getting the GUI extension invoking
the POV-Ray Render routine.
The function runs fine if I call it within the DLL, like if I call it
from the required GUIExt About box. It GPF's when it is called from an
external program. This leads me to believe that InitStruct is not
pointing to the same memory because, which it should because I have it
defined within the data_seg and specify it as shared.
Any help would be greatly appreciated. If you would like to see my full
source, let me know.
Thanks Ryan
My render function is as follows
//Globals
#pragma data_seg ("shared")
ExternalVarStruct POVVarsStruct = {NULL} ;
GuiExtInitStruct *InitStruct = NULL ; // Points to the Initstruct that
POV Loads
#pragma data_seg ()
EXPORT BOOL CALLBACK RenderStart(PSTR pSource, PSTR pCommand)
{
//Initialize the POVVarsStruct
POVVarsStruct.RecSize = sizeof(ExternalVarStruct);
//Loads the current Pov Vars into POVVarsStruct
InitStruct->ExternalRequest (RequestGetVars, &POVVarsStruct );
//Change to the source file that we wish to render
strcpy(POVVarsStruct.source_file_name,pSource);
//If we have command line swiches, change them too
if (pCommand != NULL)
strcpy(POVVarsStruct.command_line, pCommand);
// Set the POV vars to what we want
InitStruct->ExternalRequest (RequestSetVars, &POVVarsStruct);
// Start the POV rendering
if(ExRequestOK != InitStruct->ExternalRequest
(RequestStartRendering,NULL))
{
InitStruct->ExternalRequest(RequestStartRendering,NULL);
return FALSE;
}
else
return TRUE;
}
Post a reply to this message
|
![](/i/fill.gif) |