GL_NV_query_resource returns zero

i have the following problem: When i query the size of the buffer needed to hold the results

int buf_size = glQueryResourceNV(GL_QUERY_RESOURCE_TYPE_VIDMEM_ALLOC_NV, 0, 0, NULL);

the returned value is zero.
I have an RTX 2070 GPU and the OS is Windows 10.
Driver version: 417.35

Thanks in advance.