//these functions are in the dll...
int WINAPI OPVisualizationDetails(char *name,int bflen)
{
//name = malloc(strlen(OUR_VIS_NAME)+1);
int terminator = 0;
int ourbflen = strlen(OUR_VIS_NAME);
if(ourbflen > bflen)
terminator = bflen;
else
terminator = ourbflen;
int robocop;
for(robocop =0 ; robocop < terminator ; robocop++)
name[robocop] = OUR_VIS_NAME[robocop];
//strcpy(name,OUR_VIS_NAME);
//we malloc it and our 'parent' frees it.
return 0;
}
int WINAPI OPVisualizationRender(unsigned char *bits, float *spectrum, int w, int h)
{
//automatic...
memset(bits,255,(w * h * 3));
//manual
//unsigned char * p = (unsigned char *)bits;
int i;
for(i = 0 ; i < (256) ; i++)
{
//*p++ = (unsigned char)196;
bits[i] = (unsigned char) 64;
// bits[i] = 63;
}
//do something that will show on the screen...
return 0;
}
//these functions are in the calling code :
MI_VISUALIZATIONS[MI_CURRENTVIS].VIS_RENDER((unsigned char *)MEDIA_INFORMATION.MI_SPEC_IMG.I_PIXELS,
(float *)MEDIA_INFORMATION.MI_SPECTRUM,
(int) MI_SPEC_BM_W,
(int) MI_SPEC_BM_H);
//the VIS_RENDER is actually the pointer to that function
//since I stepped through it with the debugger and it is entering the function
//the only problem is that it does not set the values for the bit... whic is :
typedef struct tag_RGBT
{
unsigned char R;
unsigned char G;
unsigned char B;
}RGBT;
typedef struct tag_IMG
{
int I_W;
int I_H;
int I_X;
int I_Y;
RGBT *I_PIXELS;
}IMG;
which doesn't work since I get the first function (OPVisualizationDetails) to
input the correct values for us (OUR_VIS_NAME) is defined as "OurFirstVis", and that bit is working... I can't for the life of me figure it out...please help...?