hi, i know that default Debug configuration differs a little bit from Release (optimizations, etc etc), but why code below works fine in Debug and fails in Release

i want to check whatever recyclebin is empty or not:
Code:
SHQUERYRBINFO BinInfo;
if (SHQueryRecycleBin(NULL,&BinInfo)!=S_OK)
     //SHQueryRecycleBin failed
if ( BinInfo.i64NumItems == 0 ) // recycle bin is empty
     // do something
i have experimented with recyclebin path but without success