Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problems with aversion() under Netware 5.x
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00488742
Message ID:
00489382
Views:
10
>>>>>I am running into what looks to me like a problem with aversion() under netware 5.x. We include a small program in our distribution that is an exe with a version number in it. What we are getting is a problem with aversion() appearing to not work when run against the file on the server, but if run against the same file on the workstation it works fine. we actually get error 1234 (array dimensions invalid) when it tries to run (at least that is the line the errror is being reported for).
>>>>>
>>>>>Has anybody else run into this and if so, what can be done to correct/avoid this error?
>>>>
>>>>Do you mean AGETFILEVERSION()? I just tested it with Netware 5.00c from the command window and didn't have a problem. Does it happen if you dimension the array to 15 elements beforehand?
>>>
>>>Yes I mean agetfileversion(). No, I didn't dimension it to 15 first, but the strange thing it is only gives problem on the server (this is happening at a customer site, and has not been reported elsewhere.)
>>
>>I don't this behavior here (then again, there's a lot of stuff I don't see< s >). Anyway, the suggestion was based on the behavior of GetFileVersion() from the Foxtools library. When using that function, you were required to DIMENSION the array prior to the call.
>
>According to the docs for agetfileversion()
>
>Creates an array containing information about files with Windows version resources such as .exe, .dll, and .fll files, or automation servers created in Visual FoxPro.
>
>Syntax
>
>AGETFILEVERSION(ArrayName, cFileName)
>
>Returns
>
>Numeric
>
>Arguments
>
>ArrayName
>
>Specifies the name of the array in which the file information is placed. If the array you specify doesn't exist, Visual FoxPro automatically creates the array. If the array exists and isn't large enough to contain the file information, Visual FoxPro automatically increases the size of the array. If the array is larger than necessary, Visual FoxPro truncates the array.
>
>As you can see, it says it will create the array. I dimension it to 1 element just to be sure (I have seen others I swear said they would create the array that did in development mode, but not at runtime). I did however change the code to dimension it as myarray(15) (not the actual name here) but its going to be a while before I can send the current work version to the customer (still other stuff in progress.)

Cy,

I don't believe that the docs are totally in error about sizing the array at least. It is in error about being able to retrieve the information from a VFP in process OLE Automation server (DLL) simply because they don't contain the necessary information in the file.

Due to my experience with using GetFileVersion() from Foxtools, I habitually dimension the array appropriately. My stuff runs on Netware 5.0/Client 32 and the Microsoft Client, and I can't replicate the problem.
George

Ubi caritas et amor, deus ibi est
Previous
Reply
Map
View

Click here to load this message in the networking platform