extramayo
asked on
findfirstchangenotification in windows 95/98
I coded and tested my program in Windows XP. I began testing it on Windows 95/98, but discovered that findfirstchangenotificatio n sets a variable to -1 on 95/98. This seems like an error to me, especially when the folder change events are not occurring. Is there something I'm missing? I tried the same path (on local machine) on both computers.
ASKER
And, I've discovered the Subtree arguement is a long, not a boolean... what are the values for it though?
ASKER
One last followup. To clarify: findfirstchangenotifiction sets handle to -1 if subtree is true and returns normal value if set to false. This problem occurs only on a windows 98 machine.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks, that was it.
Public Function NotifyCreate(lpPathName As String, blnSubTree As Boolean, FLAGS As Long) As Long
Dim lngSubTree
' convert boolean to C boolean -1&0 -> 1&0
If blnSubTree = True Then
lngSubTree = 1
Else
lngSubTree = 0
End If
NotifyCreate = FindFirstChangeNotificatio n(lpPathNa me, lngSubTree, FLAGS)
End Function
Public Function NotifyCreate(lpPathName As String, blnSubTree As Boolean, FLAGS As Long) As Long
Dim lngSubTree
' convert boolean to C boolean -1&0 -> 1&0
If blnSubTree = True Then
lngSubTree = 1
Else
lngSubTree = 0
End If
NotifyCreate = FindFirstChangeNotificatio
End Function
ASKER
NotifyCreate = FindFirstChangeNotificatio
...where blnSubTree = True
It works fine, but without detecting folder changes of subfolders of the lpPathName folder. Any ideas?