forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

editable list view control

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> 64-bit
View previous topic :: View next topic  
Author Message
Ralf



Joined: 30 Aug 2007
Posts: 50
Location: munich

PostPosted: Fri Jul 20, 2018 12:55 pm    Post subject: editable list view control Reply with quote

I am struggling with program crashes when using a 64bit executable with editable list views. I have tracked down the Problem to the SRC-Compiler in conjunction with a user supplied manifest.
See the following simple program:
Code:

      winapp
!=================
      Program Test_Listview
!=================
      integer,dimension(2)  :: isel
      character(len=20),dimension(0:1) :: items
 
      integer :: winio@
      integer :: iw
     
      items(0) = '|Header'
      items(1) = '|Test'
       
      iw = winio@ ('%ca[Test lv]&')
      iw = winio@ ('%lv[edit_cells]',200,100,items,2,isel,1)
 
      stop
 
      end

This program runs fine without linking a resource file. but when I link a resource file using the clrwin.manifest file (copied from the FTN95 manual),
I get a program crash as soon as I leave a cell from the listview (etc. by pressing the tab-key).

When I use a resource file without the line:
Code:

 1  24  clrwin.manifest

I don't get any crashes


Last edited by Ralf on Fri Jul 20, 2018 1:17 pm; edited 1 time in total
Back to top
View user's profile Send private message
Ralf



Joined: 30 Aug 2007
Posts: 50
Location: munich

PostPosted: Fri Jul 20, 2018 1:16 pm    Post subject: Reply with quote

This is the error message:

Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Sat Jul 21, 2018 8:13 am    Post subject: Reply with quote

I am not clear as to whether a manifest makes any difference under 64 bits. If it does then the manifest takes a different form.

See for example, ftn95.chm under "x64 platform" and "Introduction to 64 bit FTN95".
Back to top
View user's profile Send private message AIM Address
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2388
Location: Yateley, Hants, UK

PostPosted: Sat Jul 21, 2018 9:45 pm    Post subject: Reply with quote

Oddly, the manifest referred to mentions 'Win32'.

Eddie
Back to top
View user's profile Send private message
Ralf



Joined: 30 Aug 2007
Posts: 50
Location: munich

PostPosted: Mon Jul 23, 2018 8:23 am    Post subject: Reply with quote

Paul,
I would like to use the manifest, since without this I get an old Win95 style for buttons and other controls.
I use exactly the example from ftn95.chm "Introduction to 64 bit FTN95".
If I try to change attribute values (like "ia64" for processorArchitecture) according to the Microsoft documentation (https://docs.microsoft.com/de-de/windows/desktop/SbsCs/assembly-manifests) the program does'nt start at all with different error Messages.

@Eddie : win32 is the only possible value for the type attribute according to the Microsoft pages.
Back to top
View user's profile Send private message
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2388
Location: Yateley, Hants, UK

PostPosted: Mon Jul 23, 2018 10:26 am    Post subject: Reply with quote

Hi Ralf,

That's interesting. I never understood manifests, as they are described in a language that I don't speak - even though it purports to be English!

A good number of years ago, I discovered somewhere the default.manifest, and I have used it as a mantra to ward off evil Win95 demons and give me a later look and feel without the bad vibes- but then I only have need for the 32-bit version.

My (limited) understanding of such things suggests that ia64 is a bad choice, as I think FTN95/64 uses the other (x64) option.

Eddie
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Mon Jul 23, 2018 2:07 pm    Post subject: Reply with quote

Ralf

The key is to change from

processorArchitecture="X86"

to

processorArchitecture="*"

within <dependentAssembly>.

"*" appears to work for both "X86" and "x64".
Back to top
View user's profile Send private message AIM Address
Ralf



Joined: 30 Aug 2007
Posts: 50
Location: munich

PostPosted: Mon Jul 23, 2018 2:31 pm    Post subject: Reply with quote

Paul,

that's what I actually use. I took the clrwin.manifest-example from ftn95.chm:

Code:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
    <security>
      <requestedPrivileges>
        <requestedExecutionLevel level="asInvoker" uiAccess="false"/>
      </requestedPrivileges>
    </security>
  </trustInfo>
  <dependency>
    <dependentAssembly> <assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0"
                                          processorArchitecture="*" publicKeyToken="6595b64144ccf1df" language="*"/>
    </dependentAssembly>
  </dependency>
</assembly>
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Mon Jul 23, 2018 7:10 pm    Post subject: Reply with quote

Ralf

It worked OK for me. I will check it again tomorrow.
Back to top
View user's profile Send private message AIM Address
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Mon Jul 23, 2018 7:35 pm    Post subject: Reply with quote

Ralf

If you run SRC externally then you need /r on the command line.
Then load the .res file when linking with SLINK64.
Back to top
View user's profile Send private message AIM Address
Ralf



Joined: 30 Aug 2007
Posts: 50
Location: munich

PostPosted: Wed Jul 25, 2018 10:46 am    Post subject: Reply with quote

Paul

this is exactly what I do.

These are all the files, that I use for building the sample program:

Source-file "testlv.f95" :

Code:
      winapp
!=======================================================================
      Program Test_Listview
!======================================================================= 
      integer,dimension(2)  :: isel
      character(len=20),dimension(0:1) :: items
 
      integer :: winio@
      integer :: iw
     
      items(0) = '|Header'
      items(1) = '|Test'
 
     
      iw = winio@ ('%ca[Test lv]&')
      iw = winio@ ('%lv[edit_cells]',200,100,items,2,isel,1)
 
      stop
 
      end


Resource-file "tlv.rc":
Code:
 1  24  clrwin.manifest


makefile "make_testlv.bat" for building the program:

Code:
src tlv.rc /r
ftn95 /64 testlv.f95
slink64 @lw


link-file "lw" :
Code:
lo testlv
lo tlv.res
windows
file Test_lv


clrwin.manifest is the same as posted on Monday.

Starting the program, editing the cell with contents "Test" and exiting the cell by pressing the tab-key produces the crash with the error message posted above.

When I compile and link the same source as 32bit, the program runs fine.

I am using version 8.30 on a PC with Windows 10 Enterprise
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Wed Jul 25, 2018 5:19 pm    Post subject: Reply with quote

Ralf

I have managed to generate an error condition. I did not activate the cell as you now describe.

I will make a note that it needs investigating. The failure occurs within the Windows API so it might be difficult to fix.
Back to top
View user's profile Send private message AIM Address
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Mon Aug 06, 2018 1:50 pm    Post subject: Reply with quote

Ralf

I now have a potential fix for this failure. It is a fix that needs verifying in that it could do more than fix the failure by perhaps stopping other legitimate activity.

Here is a link to a clearwin64.dll specifically for this issue with the potential fix applied.

https://www.dropbox.com/s/4tf2m46kelcowdj/newDLLs25.zip?dl=0
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> 64-bit All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group