I'm having a problem with a small piece of code:

LPTCITEM g_ptci;

g_ptci = (LPTCITEM) new LPTCITEM;


//g_ptci->mask = TCIF_TEXT; or use this for txt
g_ptci->mask = TCIF_PARAM;

TabCtrl_GetItem(hTaskBar, 1, g_ptci);

Where hTasBar is the handle to the Tasbar (e.g. hWnd).

When ever I call TabCtrl_GetItem it causes an exception error...the handle to the window seems okay...as I can clear all the tabs and get the number of tabs using it.

Thanx for any help

Really can't understand what is wrong

Please help ...really appreciate it.