Welcome to the new FlexRadio Community! Please review the new Community Rules and other important new Community information on the Message Board.
Need the latest SmartSDR, Power Genius, Tuner Genius and Antenna Genius Software?
SmartSDR v3.8.19 and the SmartSDR v3.8.19 Release Notes | SmartSDR v2.12.1 and the SmartSDR v2.12.1 Release Notes
SmartSDR v1.12.1 and the SmartSDR v1.12.1 Release Notes
Power Genius XL Utility v3.8.8 and the Power Genius XL Release Notes v3.8.8
Tuner Genius XL Utility v1.2.11 and the Tuner Genius XL Release Notes v1.2.11
Antenna Genius Utility v4.1.8
SmartSDR v3.8.19 and the SmartSDR v3.8.19 Release Notes | SmartSDR v2.12.1 and the SmartSDR v2.12.1 Release Notes
SmartSDR v1.12.1 and the SmartSDR v1.12.1 Release Notes
Power Genius XL Utility v3.8.8 and the Power Genius XL Release Notes v3.8.8
Tuner Genius XL Utility v1.2.11 and the Tuner Genius XL Release Notes v1.2.11
Antenna Genius Utility v4.1.8
If you are having a problem, please refer to the product documentation or check the Help Center for known solutions.
Need technical support from FlexRadio? It's as simple as Creating a HelpDesk ticket.
Need technical support from FlexRadio? It's as simple as Creating a HelpDesk ticket.
flexlib.dll x86 only? (v1.4.0)
rfoust
Member ✭✭
Trying to load the new flexlib.dll w/ v1.4 and i'm getting an error. A quick google search seems to indicate the dll may have only been compiled with x86 support only, not x64.
If it was compiled with x64 support too, then maybe I'm doing something wrong. :-) Here is the error (can be reproduced in powershell):
C:Program FilesFlexRadio SystemsSmartSDR v1.4.0> add-type -path $p
add-type : Could not load file or assembly 'file:///C:program filesFlexRadio SystemsSmartSDR v1.4.0flexlib.dll' or
one of its dependencies. An attempt was made to load a program with an incorrect format.
At line:1 char:1
+ add-type -path $p
+ ~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Add-Type], BadImageFormatException
+ FullyQualifiedErrorId : System.BadImageFormatException,Microsoft.PowerShell.Commands.AddTypeCommand
C:Program FilesFlexRadio SystemsSmartSDR v1.4.0>
If it was compiled with x64 support too, then maybe I'm doing something wrong. :-) Here is the error (can be reproduced in powershell):
C:Program FilesFlexRadio SystemsSmartSDR v1.4.0> add-type -path $p
add-type : Could not load file or assembly 'file:///C:program filesFlexRadio SystemsSmartSDR v1.4.0flexlib.dll' or
one of its dependencies. An attempt was made to load a program with an incorrect format.
At line:1 char:1
+ add-type -path $p
+ ~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Add-Type], BadImageFormatException
+ FullyQualifiedErrorId : System.BadImageFormatException,Microsoft.PowerShell.Commands.AddTypeCommand
C:Program FilesFlexRadio SystemsSmartSDR v1.4.0>
0
Comments
-
Figured out how to check for myself, it's x86 only. :-( Any chance of getting a recompiled version? (edit: it should be MSIL which is what v1.3.8 is)
(See link for reference): https://msdn.microsoft.com/library/system.reflection.processorarchitecture
C:Program FilesFlexRadio SystemsSmartSDR v1.4.0> [reflection.assemblyname]::getassemblyname($p) | fl
Name : FlexLib
Version : 1.4.0.28243
CultureInfo :
CultureName :
CodeBase : file:///C:/program files/FlexRadio Systems/SmartSDR v1.4.0/flexlib.dll
EscapedCodeBase : file:///C:/program%20files/FlexRadio%...
ProcessorArchitecture : X86
ContentType : Default
Flags : None
HashAlgorithm : SHA1
VersionCompatibility : SameMachine
KeyPair :
FullName : FlexLib, Version=1.4.0.28243, Culture=neutral, PublicKeyToken=null
C:Program FilesFlexRadio SystemsSmartSDR v1.4.0>0 -
What are you trying to load it in? You can indeed compile FlexLib as Any CPU (which supports both x86 and x64), but all of the libraries must be changed.0
-
Hi Eric - I use flixlib directly in powershell and load it using add-type (see above for an example). Earlier versions of flexlib were compiled for any cpu so it worked fine until v1.4.0
-
These are the actual functions I'm using to load it (lets see if the formatting works here):
function get-flexlatestfolderpath { $flexRoot = "c:program filesFlexRadio Systems" if (test-path $flexRoot) { $dirs = gci $flexRoot if (-not $dirs) { throw "Unable to locate FlexRadio SmartSDR installation path!" } $modifiedDirs = @() foreach ($dir in $dirs) { $rootName,$fullVersion,$null = $dir.name -split " " if ($fullVersion) { $flexVersion = [version]($fullVersion -replace "v","") $modifiedDir = $dir | add-member NoteProperty Version $flexVersion -passthru $modifiedDirs += $modifiedDir } } if ($modifiedDirs) { ($modifiedDirs | sort Version -desc)[0].fullname } } } function get-flexlibpath { $latestPath = get-flexlatestfolderpath if ($latestPath) { $latestpath + "FlexLib.dll" } } function import-flexlib { $flexLibPath = get-flexlibpath if ($flexLibPath) { try { [void][reflection.assembly]::GetAssembly([flex.smoothlake.FlexLib.api]) } catch [system.exception] { add-type -path $flexLibPath } } else { throw "Unable to locate FlexRadio FlexLib library!" } [flex.smoothlake.FlexLib.api]::init() } import-flexlib
0 -
KI4TTZ: Calling FlexLib directly from PowerShell is DARN clever. Nice!
Peter K1PGV0 -
Thanks! Yeah I've been working in a command line interface off and on for the last year, I need to finally get it cleaned up and posted to github after I get this new issue resolved.0
-
So I got flexlib compiled all by myself (yay, first time!) as "any cpu" and it seems to be working fine. So not sure if the one that came with ssdr 1.4 being compiled as x86 was just an oversight or if there was some reason for it?
I guess there aren't any licensing/legal issues with me including my own compiled version of flexlib.dll with my app?
I think I'll add an additional check that uses the latest one in the ssdr folder, only if it is compatible with the host architecture. Otherwise, look for one in my custom app install folder and use that. I dunno, I'm making this up as I go. :-)0 -
Going to x86 was not an oversight. In a .NET application, all of the libraries must agree on the architecture (x86, x64 or Any CPU which supports both). It was intentional and required to cooperate with other libraries that were added to the application.0
Leave a Comment
Categories
- All Categories
- 289 Community Topics
- 2.1K New Ideas
- 534 The Flea Market
- 7.5K Software
- 6K SmartSDR for Windows
- 146 SmartSDR for Maestro and M models
- 360 SmartSDR for Mac
- 249 SmartSDR for iOS
- 231 SmartSDR CAT
- 172 DAX
- 352 SmartSDR API
- 8.8K Radios and Accessories
- 7K FLEX-6000 Signature Series
- 26 FLEX-8000 Signature Series
- 850 Maestro
- 44 FlexControl
- 847 FLEX Series (Legacy) Radios
- 796 Genius Products
- 416 Power Genius XL Amplifier
- 277 Tuner Genius XL
- 103 Antenna Genius
- 243 Shack Infrastructure
- 166 Networking
- 404 Remote Operation (SmartLink)
- 130 Contesting
- 631 Peripherals & Station Integration
- 125 Amateur Radio Interests
- 870 Third-Party Software