I really appreciate the response.
I have tried:
JFC_STRING_Item1=(JFC_STRING*)(Item1 + p_lpOffset);
But unknown to you - Item1 is a (void*) or void pointer.[edit] and the p_lpPointer is an address but is an unsigned int also - the name is misleading[/edit] This means the unsigned int like here is required to compile but gives undesired results:
JFC_STRING_Item1=(JFC_STRING*)((unsigned int)Item1 + p_lpOffset);
So the code snippet I originally posted is the only one that works.
I have a sneaking suspicion I need a ** <----Indirect Pointer notation... but I can't figure out the syntax.
Basically, Item1 - is a pointer to a class, the offset is the position in this pointed to class - of a pointer ... to yet another class.
The code I posted originally - I swear it WORKS, but I'm doing two steps. It took many iterations to get it to work - but it works beautiful I swear. I just think the way I wrote it to finally work still is not "reduced" as much as it could be.
So I'm shooting for:
ADDRESS_IN_MEM + OFFSET = LOCATION_OF_A_POINTER_TO_A_CLASS
Note: ADDRESS_IN_MEM is the value INSIDE the Void* Item1 pointer.
NOTE: TODD - Your answer and my (prior to this post) previous attempts KEPT coming to the syntax you came up with. It seems correct when I read it to. But in the debugger - the only time I see the correct values of this "class" pointed to by a pointer in my Item1 "class" is with the syntax I posted above.
(I was iteratively trying things - 3rd evening trying to fix this flawed code... and I got it today when I came home...)
I think I forced the same functionality as a indirect pointer - or "A pointer that points to a pointer that points to my class" normally described as the ** operator. I dunno - I think I got lucky - I just think Its not as concise as it should be. I also think when someone gets it - somehow seeing the syntax will open a new level of pointer understanding for me (and hopefully others).
Thanx for giving it a honest go of it!
Jason