I have started this thread, because I need to get a clear answer
---------------------------------------------
I am not a 3-rd party developer but my software depends on a runtime-library developed in PB
The first version was compiled with PBDLL50. Latest version compiled with PBWin70
Old programs developed in PBDLL50/60/61 use this runtime-dll
---------------------------------------------
So, I am in deep trouble here. I am passing a PB Array to a PB function and I can not find any indication
in the documentation saying PB Arrays model PBWIN70 are NOT COMPATIBLE with older PB Arrays
---------------------------------------------
Will this work when called from pre-pbwin70 programs?
------------------
Fred
mailto:[email protected][email protected]</A>
http://www.oxenby.se
[This message has been edited by Fred Oxenby (edited January 31, 2003).]
Originally posted by Michael Mattias:
I don't know where you got this idea the array descriptors have
changed in PB 7.0 and that they are incompatible with PB 5.0 and 6.0,
but it doesn't seem to be holding true
From the best possible official source within PowerBASIC Inc.
The problem I had was trying to use the Win 7.0 ARRAYATTR function against arrays created by PB/DLL 6.0.
After much testing and a series of emails with demo programs to the support department, which referred the question to the "R&D" department, I got this very clear reply:
The secret is "They are not compatible". Therefore, it would not be in
your best interests to try to pass entire arrays between versions.
Instead, pass a pointer to the first element and use DIM...AT x
Maybe there are some things which will work, but this was good enough for me to avoid trying further or otherwise pressing my luck.
[later]
I know REDIM of a passed array will not work; this was one of the specific verbs I asked about, as I often REDIM a passed array to the correct size in external function calls.
[/later]
I don't know where you got this idea the array descriptors have
changed in PB 7.0 and that they are incompatible with PB 5.0 and 6.0,
but it doesn't seem to be holding true
From the best possible official source within PowerBASIC Inc.
The problem I had was trying to use the Win 7.0 ARRAYATTR function against arrays created by PB/DLL 6.0.
After much testing and a series of emails with demo programs to the support department, which referred the question to the "R&D" department, I got this very clear reply:
The secret is "They are not compatible". Therefore, it would not be in
your best interests to try to pass entire arrays between versions.
Instead, pass a pointer to the first element and use DIM...AT x
Maybe there are some things which will work, but this was good enough for me to avoid trying further or otherwise pressing my luck.
[later]
I know REDIM of a passed array will not work; this was one of the specific verbs I asked about, as I often REDIM a passed array to the correct size in external function calls.
[/later]
I am not a 3-rd party developer but my software depends on a runtime-library developed in PB
The first version was compiled with PBDLL50. Latest version compiled with PBWin70
Old programs developed in PBDLL50/60/61 use this runtime-dll
---------------------------------------------
So, I am in deep trouble here. I am passing a PB Array to a PB function and I can not find any indication
in the documentation saying PB Arrays model PBWIN70 are NOT COMPATIBLE with older PB Arrays
---------------------------------------------
Will this work when called from pre-pbwin70 programs?
Code:
Function FSO_GetFiles(ByVal PathSpec$,ByVal Mask$,Filer()As String)Export As Long Local fd As WIN32_FIND_DATA Local fAttr As Dword Local cnt&,hFind??? If Len(PathSpec$) = 0 Then Function = 0:Exit Function If FSO_FolderExists(PathSpec$) = %false Then Function = 0:Exit Function '..samla ihop filerna.......... On Error Resume Next If Right$(PathSpec$,1)<>"\" Then PathSpec$=PathSpec$ & "\" PathSpec$ = PathSpec$ & Mask$ ReDim Filer(1 To 1)As String cnt& = 0 hFind??? = FindFirstFile(ByVal StrPtr(PathSpec$), fd) If hFind??? = %INVALID_HANDLE_VALUE Then Function = %false :Exit Function Do If (Bit(fd.dwFileAttributes,4)= 0) And (Bit(fd.dwFileAttributes,8)=0) Then Incr cnt& ReDim Preserve Filer(1 To cnt&) Filer(cnt&) = RTrim$(fd.cFileName,Any Chr$(0,32)) End If If IsFalse FindNextFile(hFind???,fd) Then Call FindClose(hFind???):Exit Do Loop Array Sort Filer(),Collate UCase Function = cnt& End Function
Fred
mailto:[email protected][email protected]</A>
http://www.oxenby.se
[This message has been edited by Fred Oxenby (edited January 31, 2003).]
Comment