I am trying to make a call to the Windows CE 5 API call, "FindFirstChangeNotification" in a VS2008 Smart Device project using:
Private Declare Function FindFirstChangeNotification Lib "coredll.dll" _
(ByVal lpPathName As String, ByVal bWatchSubtree As Long, _
ByVal dwNotifyFilter As Long) As Long
Dim strFolderPath As String = "\My Documents\My App Files\"
Dim ptrHandle as IntPtr = FindFirstChangeNotification(strFolderPath, 0, 1)
Attempting this method results in a "System.NotSupportedException" which I assume to be an incompatibility in string types. Despite attempting different marshaling behaviors I'm still stuck after several days.