edition 7.0 the dll. introduction •a look at what’s new in the dll •a brief glimpse at “dll...
TRANSCRIPT
![Page 1: Edition 7.0 The DLL. Introduction •A look at what’s new in the Dll •A brief glimpse at “Dll Hell” and how you might minimize your time there •A look at](https://reader035.vdocuments.mx/reader035/viewer/2022070307/551a67ce55034643688b4d82/html5/thumbnails/1.jpg)
Edition 7.0The DLL
![Page 2: Edition 7.0 The DLL. Introduction •A look at what’s new in the Dll •A brief glimpse at “Dll Hell” and how you might minimize your time there •A look at](https://reader035.vdocuments.mx/reader035/viewer/2022070307/551a67ce55034643688b4d82/html5/thumbnails/2.jpg)
Introduction
• A look at what’s new in the Dll
• A brief glimpse at “Dll Hell” and how you might minimize your time there
• A look at some development environments
• A look at some applications
• How you get your own copy of the Dll
• What the future holds…
![Page 3: Edition 7.0 The DLL. Introduction •A look at what’s new in the Dll •A brief glimpse at “Dll Hell” and how you might minimize your time there •A look at](https://reader035.vdocuments.mx/reader035/viewer/2022070307/551a67ce55034643688b4d82/html5/thumbnails/3.jpg)
What’s New
• The Dll now uses the same code as the console version, so the results are identical.
• There are new species in the SMC and NWO version.
• Data supporting the growth equations in the SWO version includes old-growth stands and stands with more hardwoods.
• Lahey FORTRAN compiler (version 9.5) used to generate the files
![Page 4: Edition 7.0 The DLL. Introduction •A look at what’s new in the Dll •A brief glimpse at “Dll Hell” and how you might minimize your time there •A look at](https://reader035.vdocuments.mx/reader035/viewer/2022070307/551a67ce55034643688b4d82/html5/thumbnails/4.jpg)
Why Dll ?
• Link free solution
• Simplicity, clarity, and completeness
• Larger problems can be considered
• Larger spatial regions can be considered
• Consistent platform
![Page 5: Edition 7.0 The DLL. Introduction •A look at what’s new in the Dll •A brief glimpse at “Dll Hell” and how you might minimize your time there •A look at](https://reader035.vdocuments.mx/reader035/viewer/2022070307/551a67ce55034643688b4d82/html5/thumbnails/5.jpg)
Organization
• Three separate files– ORGEDIT: (prepare) data imputation– ORGRUN: (execute) project tree lists– ORGVOL: (volcal) Estimate volume
• They use Microsoft PE/COFF (Portable Executable Common Object File Format)
• They use Microsoft Visual Basic name decorating
![Page 6: Edition 7.0 The DLL. Introduction •A look at what’s new in the Dll •A brief glimpse at “Dll Hell” and how you might minimize your time there •A look at](https://reader035.vdocuments.mx/reader035/viewer/2022070307/551a67ce55034643688b4d82/html5/thumbnails/6.jpg)
Dll “Hell”
• DLL Hell is an official Microsoft term gleaned from their developer network (they would know, they invented it!)
• COFF (originally from DEC) has been modified by Microsoft for WinNT 3 and it continues to change (PE/COFF)– Routines prior to Visual “stuff” 6 will need to “convert” the ‘lib’
• Calling routines ‘decorate’ function and subroutine names in called Dll’s– Familiarize yourself with your environments calling protocols– Use “Alias” to convert names.– Use standard call
• Microsoft compliant lib’s are included but with the infinitude of compilers out there you may need another
![Page 7: Edition 7.0 The DLL. Introduction •A look at what’s new in the Dll •A brief glimpse at “Dll Hell” and how you might minimize your time there •A look at](https://reader035.vdocuments.mx/reader035/viewer/2022070307/551a67ce55034643688b4d82/html5/thumbnails/7.jpg)
More Hell
• Intel defined an object file standard ‘OMF’ Object Model format.– If your environment uses it you will need to
convert coff2omf should work – unless it is old then you will need to use the
utility “convert”– Borland’s Builder and Delphi also use OMF
![Page 8: Edition 7.0 The DLL. Introduction •A look at what’s new in the Dll •A brief glimpse at “Dll Hell” and how you might minimize your time there •A look at](https://reader035.vdocuments.mx/reader035/viewer/2022070307/551a67ce55034643688b4d82/html5/thumbnails/8.jpg)
Even More Hell
• Name decoration:– Borland utility TDUMP will give the names inside of
the DLL– Dumpbin is Microsoft’s solution– More feature rich programs: PEBrowse, dumpbinGUI,
etc.
• After all of this, your compiler will use its own decoration protocol to call the Dll– Read the instructions (really)
• MS Visual Basic seems to have a benign protocol so we chose to use that one
![Page 9: Edition 7.0 The DLL. Introduction •A look at what’s new in the Dll •A brief glimpse at “Dll Hell” and how you might minimize your time there •A look at](https://reader035.vdocuments.mx/reader035/viewer/2022070307/551a67ce55034643688b4d82/html5/thumbnails/9.jpg)
And Even More Hell
• Security? There isn’t any!– We don’t include viruses, really!– We don’t format hard drives
• VB solves some problems but causes others– Relatively minor things will break your code
• VB blames almost every problem on calling convention
• It is nearly always lying!
![Page 10: Edition 7.0 The DLL. Introduction •A look at what’s new in the Dll •A brief glimpse at “Dll Hell” and how you might minimize your time there •A look at](https://reader035.vdocuments.mx/reader035/viewer/2022070307/551a67ce55034643688b4d82/html5/thumbnails/10.jpg)
“Bad Dll Calling Convention”
• Get used to seeing this!• From this you might infer that there is something
wrong with your Dll– There isn’t, its your application
• It means that the stack is confused• Why?
– Optimization for speed will put memory on 4 byte boundaries, sometimes…
– Change in compiler conventions
• No optimization selected in producing the Dll
![Page 11: Edition 7.0 The DLL. Introduction •A look at what’s new in the Dll •A brief glimpse at “Dll Hell” and how you might minimize your time there •A look at](https://reader035.vdocuments.mx/reader035/viewer/2022070307/551a67ce55034643688b4d82/html5/thumbnails/11.jpg)
Tested Environments
• Lahey FORTRAN and C– Version 5
• Microsoft Visual Studio– .NET
• Microsoft Office applications– Office 2003
• Borland’s Builder– Version 5– Version 6
• Intel FORTRAN
![Page 12: Edition 7.0 The DLL. Introduction •A look at what’s new in the Dll •A brief glimpse at “Dll Hell” and how you might minimize your time there •A look at](https://reader035.vdocuments.mx/reader035/viewer/2022070307/551a67ce55034643688b4d82/html5/thumbnails/12.jpg)
A few forestry details
• No management is included, but the effects are modeled– The user is responsible for filling the management
arrays– Fertilization
• Intensity (pounds of nitrogen)• Timing (both prior and post)• Maximum of 5 fertilizer applications
– Thinning• Intensity (basal area removed)• Timing (both prior and post)• Maximum of 5 thins
![Page 13: Edition 7.0 The DLL. Introduction •A look at what’s new in the Dll •A brief glimpse at “Dll Hell” and how you might minimize your time there •A look at](https://reader035.vdocuments.mx/reader035/viewer/2022070307/551a67ce55034643688b4d82/html5/thumbnails/13.jpg)
Applications
• A simple FORTRAN application
• Spreadsheet
• Access Database (?)
• R (?)
![Page 14: Edition 7.0 The DLL. Introduction •A look at what’s new in the Dll •A brief glimpse at “Dll Hell” and how you might minimize your time there •A look at](https://reader035.vdocuments.mx/reader035/viewer/2022070307/551a67ce55034643688b4d82/html5/thumbnails/14.jpg)
FORTRAN
![Page 15: Edition 7.0 The DLL. Introduction •A look at what’s new in the Dll •A brief glimpse at “Dll Hell” and how you might minimize your time there •A look at](https://reader035.vdocuments.mx/reader035/viewer/2022070307/551a67ce55034643688b4d82/html5/thumbnails/15.jpg)
FORTRAN
• Import function with DLL_IMPORT
• Get the name right with Alias– CDEC$ ATTRIBUTES, ALIAS:'_EXECUTE' ::
EXECUTE
• Alias helps in other environments
![Page 16: Edition 7.0 The DLL. Introduction •A look at what’s new in the Dll •A brief glimpse at “Dll Hell” and how you might minimize your time there •A look at](https://reader035.vdocuments.mx/reader035/viewer/2022070307/551a67ce55034643688b4d82/html5/thumbnails/16.jpg)
The dreaded Office
• This environment is very complex• This environment is constantly changing• Don’t go here! It is evil! The dark side will
draw you in and then it will crush you!• Hire a psychologist, if you don’t get over
your desire then hire a programmer• BIG ASTERIX (*)
– What you are about to see works in Office 2003 and probably no where else
![Page 17: Edition 7.0 The DLL. Introduction •A look at what’s new in the Dll •A brief glimpse at “Dll Hell” and how you might minimize your time there •A look at](https://reader035.vdocuments.mx/reader035/viewer/2022070307/551a67ce55034643688b4d82/html5/thumbnails/17.jpg)
EXCEL
![Page 18: Edition 7.0 The DLL. Introduction •A look at what’s new in the Dll •A brief glimpse at “Dll Hell” and how you might minimize your time there •A look at](https://reader035.vdocuments.mx/reader035/viewer/2022070307/551a67ce55034643688b4d82/html5/thumbnails/18.jpg)
EXCEL
• This design borrowed from Jeff Hamann
• But the mistakes are courtesy of me
• Jeff is much too smart to this
• Use ‘R’ it is the future
• Or even better just do it in FORTRAN
![Page 19: Edition 7.0 The DLL. Introduction •A look at what’s new in the Dll •A brief glimpse at “Dll Hell” and how you might minimize your time there •A look at](https://reader035.vdocuments.mx/reader035/viewer/2022070307/551a67ce55034643688b4d82/html5/thumbnails/19.jpg)
EXCEL
![Page 20: Edition 7.0 The DLL. Introduction •A look at what’s new in the Dll •A brief glimpse at “Dll Hell” and how you might minimize your time there •A look at](https://reader035.vdocuments.mx/reader035/viewer/2022070307/551a67ce55034643688b4d82/html5/thumbnails/20.jpg)
EXCEL
![Page 21: Edition 7.0 The DLL. Introduction •A look at what’s new in the Dll •A brief glimpse at “Dll Hell” and how you might minimize your time there •A look at](https://reader035.vdocuments.mx/reader035/viewer/2022070307/551a67ce55034643688b4d82/html5/thumbnails/21.jpg)
EXCEL
![Page 22: Edition 7.0 The DLL. Introduction •A look at what’s new in the Dll •A brief glimpse at “Dll Hell” and how you might minimize your time there •A look at](https://reader035.vdocuments.mx/reader035/viewer/2022070307/551a67ce55034643688b4d82/html5/thumbnails/22.jpg)
EXCEL
![Page 23: Edition 7.0 The DLL. Introduction •A look at what’s new in the Dll •A brief glimpse at “Dll Hell” and how you might minimize your time there •A look at](https://reader035.vdocuments.mx/reader035/viewer/2022070307/551a67ce55034643688b4d82/html5/thumbnails/23.jpg)
Excel
![Page 24: Edition 7.0 The DLL. Introduction •A look at what’s new in the Dll •A brief glimpse at “Dll Hell” and how you might minimize your time there •A look at](https://reader035.vdocuments.mx/reader035/viewer/2022070307/551a67ce55034643688b4d82/html5/thumbnails/24.jpg)
The future
• Seeking testers and example generators• Examples will be posted to the ORGANON
web site• FORSight Resources is building a
replacement for the console version• Additional utilities supporting the program
– Wrapper for the GMUG tree structure– Management routine
• What of .NET?
![Page 26: Edition 7.0 The DLL. Introduction •A look at what’s new in the Dll •A brief glimpse at “Dll Hell” and how you might minimize your time there •A look at](https://reader035.vdocuments.mx/reader035/viewer/2022070307/551a67ce55034643688b4d82/html5/thumbnails/26.jpg)
The End
Questions?
![Page 27: Edition 7.0 The DLL. Introduction •A look at what’s new in the Dll •A brief glimpse at “Dll Hell” and how you might minimize your time there •A look at](https://reader035.vdocuments.mx/reader035/viewer/2022070307/551a67ce55034643688b4d82/html5/thumbnails/27.jpg)
Well I brought one…
• On average, what fraction of a square n times 2r on a side is covered by n-squared equal sized circles, of radius r, randomly distributed across it? The origin of all circles must fall in the square.