WIN32DLL_API void CALLMODE_API iMeshVertexBufferOpen(MESH*,MESHVERTEX**);
I get and understand MESH* this is a UINT, but, MESHVERTEX is a structure, so that said, what is the ** for?
How do I translate that?
That is C's method of stating a 'pointer to a pointer to a MESHVERTEX structure'. probably returns a pointer to allocated memory as an array.
Just declare it as MESHVERTEX* in Aurora and give it a pointer. You will need to dereference twice to get at the data.
Paul.
a pointer to a pointer, like pointers weren't tough enough :)
How would you dereference twice?
Drink a flaming monkey, pray to the toilet.
flush
he he he he, that is really funny Z !!!
;D I couldn't help myself.
Anyway, what I am trying to do at this time is turing out to not be feasable since it won't work in the other language I was attempting it in.
Luckly Aurora supports pointers otherwise it would be a waste here to.
I was attempting to figure it out for vb.net also, and since it is only returning the first element of the array instead of the entire 1002 set, I am buggered.
You dereference twice.
*(MESHVERTEX)*(POINTER)variable
However if they are using a C style array then you could probably just send it a pointer and use:
*(MESHVERTEX)variable[index];
I think this is the key to the program that writes itself.
*(thought)headaches->Needs.ToGet(finished).**->AhHah??|computer.Compute|::OnClose()
Oh, I forgot the braces:
*(thought)headaches->Needs.ToGet(finished).**->AhHah??|computer.Compute|::OnClose(){}
?
I wasn't being funny, just answering his question.
Multiple derferencing is common in C and C++, which is why you need to understand it if you're going to use DLL's, toolkits, physics libraries,etc that make use of C arrays.
int main( int argc, char **argv )
{
//...
}
From your first C program you're using multiple level pointers. That's because in C an array is a pointer, and they even let you write char *argv[] instead if you want. When you use the [] operator in C, it is the same thing as *(array + index * sizeof( array ) ). In this case, argv is an array of strings, and since a string is an array of characters, it's an array of arrays of characters.
Sorry if that's confusing, but that's the way it works.
I didn't mean anything by what I wrote, just having fun... to me it looks like that and feels like that a times. Didn't mean anything else more by it other than that.
Appreciate the help as always and explanations!!
Thanks all. It helps.
I have some recoding to do.