hi,
I want to know all the open file on my system(Win-2000 Server).
I am using NetFileEnum function in following way
FILE_INFO_3 *buff,*curf;
DWORD read, total, resumeh=0, rc, i;
buff = NULL;
rc=NetFileEnum(
NULL,
NULL,
NULL,
3,
(BYTE**)&buff,
2048,
&read,
&total,
&resumeh );
for ( i = 0, curf = buff; i < 1; ++ i, ++ curf )
{
printf( "%-12S %-15S \n",
curf->fi3_username, curf->fi3_pathname
);
}
if ( buff != NULL )
NetApiBufferFree( buff );
but after execution system is not allocating memory for buff
and value of read is 0.
I am stuck now. Please help me out
thanks
I want to know all the open file on my system(Win-2000 Server).
I am using NetFileEnum function in following way
FILE_INFO_3 *buff,*curf;
DWORD read, total, resumeh=0, rc, i;
buff = NULL;
rc=NetFileEnum(
NULL,
NULL,
NULL,
3,
(BYTE**)&buff,
2048,
&read,
&total,
&resumeh );
for ( i = 0, curf = buff; i < 1; ++ i, ++ curf )
{
printf( "%-12S %-15S \n",
curf->fi3_username, curf->fi3_pathname
);
}
if ( buff != NULL )
NetApiBufferFree( buff );
but after execution system is not allocating memory for buff
and value of read is 0.
I am stuck now. Please help me out
thanks