Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can VFP determine MS Project version on a file
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00618395
Message ID:
00619487
Views:
14
>>>The code above needs to be modified to:
>>>
>>>
>>>nGFH = fopen('C:\Temp\Project2.mpp')
>>>lcCheck=UPPER(fread(nGFH, 6000))
>>>fclose(nGFH)
>>>lFound = .F.
>>>#define C_MSP 'MICROSOFT PROJECT'
>>>FOR i = 1 TO occurs(c_msp, lcCheck)
>>>  nFoundAt=atc(c_msp, lcCheck,i)
>>>  if "8.0" $ substr(lcCheck,nFoundAt,21)
>>>    lFound=.t.
>>>    EXIT
>>>  ENDIF
>>>ENDFOR
>>>return lFound
>>>ENDIF
>>>
>>
>>Ooooops, you're right about the second parameter of substr(). Upper in the second line is not needed, because atc() is case insensitive.
>>
>>So did this work for you?
>
>
>Yes it worked fine and the speed over FILETOSTR was very good. The only problem I have about the whole solution is our assumption, which is currently valid, that the phrase MICROSOFT PROJECT is in the first 6000 characters and will always be followed by the version number. If MS changes this in the future then I would not know until my users complained that their input was being rejected. And I dont like to hear from user complaints. But that asided I will inform the money boys of my findings and how best to implement it. The pros and cons and then let them decide if it should be done.

This is a good way for you to justify always having access to the latest and greatest MS Project versions. MSP 2K2 is on the horizon.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform