такая беда, поможите, что не так
TestGraph.dll::
LRESULT CALLBACK AFX_EXPORT
TGraphWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
CWnd* pWnd;
pWnd = CWnd::FromHandlePermanent(hWnd);
if(pWnd == NULL)
{
pWnd = new TGraphic();
pWnd->Attach(hWnd);
}
LRESULT lResult = AfxCallWndProc(pWnd, hWnd, message, wParam, lParam);
return lResult;
}
BOOL TGraphic::RegisterWndClass(HINSTANCE hInstance)
{
WNDCLASS wc;
wc.lpszClassName = "TGRAPHIC";
wc.lpfnWndProc = (WNDPROC)TGraphWndProc;
wc.hCursor = ::LoadCursor(NULL, IDC_ARROW);
wc.hIcon = NULL;
wc.hbrBackground = (HBRUSH) ::GetStockObject(WHITE_BRUSH);
wc.style = CS_GLOBALCLASS;
wc.cbClsExtra = 0;
wc.cbWndExtra = 0;
wc.hInstance = hInstance;
//И ВОТ ЗДЕСЬ НА ВЫЗОВЕ RegisterClass access violation

return (::RegisterClass(&wc) != 0) ;
}
В чем беда? Поможите