Judging from the code snipped you posted, we can assume you are using Microsoft's Kinect for Windows SDK.
The coordinates of the joints are stored in the SkeletonPositions member of the NUI_SKELETON_DATA
structure. Instances of this structure can be found in the SkeletonData member of the NUI_SKELETON_FRAME
structure, which is provided whenever the skeleton tracking engine finishes tracking.
Of course, this will only work, if the sensor is initialized properly. Please have a look at the sample projects that come with the SDK, and read Microsoft's online documentation.
Also, be aware that the Kinect's coordinate system has its origin at the sensor and provides coordinate values ranging roughly from -2.2 to 2.2 on the x-axis, from -1.6 to 1.6 on the y-axis, and from 0.0 to 4.0 on the z-axis (depth). Thus, you might need to apply some transformations.