Re: CeFindFirstFile function
Does the process you created create the file you are looking for?
If so, I am guessing that the process has not created the file by the time you look for it.
Re: CeFindFirstFile function
Hello,
Thx. for the reply. Yes, the process creates the file I'm looking for. I also provide some for the process to complete w/ the following code:
Code:
sPathtoPPC = "\Storage Card\MyDB\"
'wait for process to complete
For i = 15 to 0 Step -5
lHandle = CeFindFile(sPathtoPPC & sDataFile, structData)
If lHandle = INVALID_HANDLE then
Debug.Print CeGetLastError 'returns 18
Debug.Print CeRapiGetError 'returns "successful"
Sleep 5000
Else
Exit For
End If
Next i
As mentioned in the previous post, the odd thing about this is when I using an executable jar rather than a zip file, the function was able to find the file w/ no problem.
any help is appreciated.
Re: CeFindFirstFile function
I don't understand the bit about
Quote:
using an executable jar rather than a zip file
Have you checked manually that the file exists OK?
Re: CeFindFirstFile function
Hello Pete,
Thanks for the response. It's appreciated. I apologize for the vague post. Originally, an executable jar was used as the process that was ran via CeCreateProcess. It appears that CeCreateProcess did not consistently run the jar file, so I switched a zip file to retain the java app or process to be executed.
Yes, I checked manually to see if the file exists on device. I have copied the file to the desktop as well and the file is what it should be.
W/ a little more investigation, it appears that the function can't find this newly created file w/ the existing RAPI connection. I've tried disconnecting (i.e. CeRapiUnit) after running the process on the device and then re-connecting to find the file but unfortunately, this did not work either. However, when I re-run the desktop app to run the process again on the device, the file is found.
Any help is appreciated.
Re: CeFindFirstFile function
I would write a quick app on the device just to create an empty file, and then try creating that app, and seeing if cefindfirstfile works.
Other than that I don't know what to suggest next.
Re: CeFindFirstFile function
Oh, ok. Thx. for your help.