call winapi function

how i can call this api:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
static const wchar_t *lol=L"";

LRESULT WINAPI BSSSendMessageW(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
{
    if ( msg == LVM_INSERTITEMW || msg == LVM_SETITEMW)//Intercepts LVM_INSERTITEM and LVM_SETITEM messages
    {
        if (!lstrcmpW(((LVITEMW*)lparam)->pszText, lol))//The lparam is a LVITEM* struct.
        {
            return 0;//we simply return 0 (and we do not call the real SendMessage function.
        }
        return 0;
    }
    return base.SendMessage(hwnd, msg, wparam, lparam);//Calls the real SendMessage function.
}


Since my int main function:
1
2
3
4
int main()
{
//calling api function
}
Last edited on
Topic archived. No new replies allowed.