使用WndClass的访问冲突读取位置

EXT*_*RAM 0 c++ windows winapi

使用此代码,我遇到一个问题:

BOOL RegisterApp(HINSTANCE hInst)
{
    WNDCLASS wc;

    wc.style         = CS_HREDRAW | CS_VREDRAW;
    wc.lpfnWndProc   = WndProc;
    wc.cbClsExtra    = 0;
    wc.cbWndExtra    = 0;
    wc.hInstance     = hInst;
    wc.hIcon         = LoadIcon(NULL, IDI_APPLICATION);
    wc.hCursor        = LoadCursor(NULL, IDC_ARROW);
    wc.hbrBackground = (HBRUSH)GetStockObject(GRAY_BRUSH);
    wc.lpszClassName = szClassName;
    //

    //
    return RegisterClass(&wc);
}
Run Code Online (Sandbox Code Playgroud)

当我尝试使用时&wc,出现此错误:

Unhandled exception at 0x763adf81 in lab3.exe: 0xC0000005: Access violation reading location 0xcccccccc.
Run Code Online (Sandbox Code Playgroud)

请帮助我,我需要做什么?