EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Install drivers Issues?

Also by EldoS: SecureBlackbox
200+ components and classes for digital security, signing, encryption and secure networking.
#29296
Posted: 04/17/2014 10:28:45
by Peter Flynn (Basic support level)
Joined: 03/04/2014
Posts: 10

Hi

I have placed the following code in a sample app that I am using to evaluate the product.

using SolFSDrv;
Process currentProcess = Process.GetCurrentProcess();
uint pid = Convert.ToUInt32(currentProcess.Id);
string pid2 = currentProcess.ProcessName.ToString();

try
{
SolFSStorage.Initialize(pid2);
}
catch (ESolFSError error)
{

SolFSStorage.Install("c:\user\solfs.cab", pid2, "", false, SolFSModule.smDiskDriver | SolFSModule.smFSDriver,out reboot);
if (reboot != 0)
MessageBox.Show("System restart is required before you can mount SolFS storages");
}

However on a windows 7 machine the application just crashes each and every time.

Removing the SolFS code calls allows the app to display a blank page so the Frameworks appear fine.

Can you help me figure out what is going wrong? As we are looking to use the OS version in our application and will be ready to purchase in the next few weeks (once our admin is back to facilate the purchase)

The Win 7 machine has DotNet 4.5 installed so could it be missing something else?

The Dev machine had the drivers installed when I ran the download from your site


Regards

Peter
#29298
Posted: 04/17/2014 10:40:46
by Volodymyr Zinin (EldoS Corp.)

Hi Peter,

Call the Initialize method after the cab-file has been installed. Moreover it's enough to install the driver (cab-file) only once from the application that is executed elevated (as administrator) and then work with SolFS from non-elevated apps.
#29309
Posted: 04/22/2014 06:28:55
by Peter Flynn (Basic support level)
Joined: 03/04/2014
Posts: 10

Hi I have attached a link to a sample project that crashes on my local build

This is a project to be run to install the drivers on the target machine before we deploy our app as this needs admin rights?

https://www.dropbox.com/s/ujbg060gq8rbmkq/WpfApplication2.zip

Can you take a look and see what I am doing wrong?

I have added the SolFSStorage.Initialize(pid2); to the program and in debug on the dev machine which has the OS version installed I get this

System.IO.IOException was unhandled
HResult=2
Message=The system cannot find the file specified.

Source=SolFS5DrvNet
StackTrace:
at SolFSDrv.?A0x24442870._CheckStorageResult(Int32 StorageResult, Int32 Line)
at SolFSDrv.SolFSStorage.Install(String cabFileName, String programName, String pathToInstall, Boolean supportPnP, UInt32 modulesToInstall, UInt32& rebootNeeded)
at WpfApplication2.MainWindow.btn_Install_Click(Object sender, RoutedEventArgs e) in c:\Users\pflynnx\Documents\Visual Studio 2012\Projects\WpfApplication2\WpfApplication2\MainWindow.xaml.cs:line 38
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.Controls.Button.OnClick()
at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
at System.Windows.Input.InputManager.ProcessStagingArea()
at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
at System.Windows.Application.RunInternal(Window window)
at System.Windows.Application.Run()
at WpfApplication2.App.Main() in c:\Users\pflynnx\Documents\Visual Studio 2012\Projects\WpfApplication2\WpfApplication2\obj\Debug\App.g.cs:line 0
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:



Attached are the event viewer logs for this from the machine with No SolfS?



Regards

Peter


VS generates the following warning too?

Warning 1 There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "SolFS5DrvNet, Version=5.0.131.0, Culture=neutral, PublicKeyToken=fe66f2835d691953, processorArchitecture=AMD64", "AMD64". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project. WpfApplication2


[ Download ]
#29314
Posted: 04/23/2014 03:53:58
by Volodymyr Zinin (EldoS Corp.)

It seems the application can't find the correct build for SolFS5DrvNet.dll. Create in the Visual Studio configuration manager the solution for 32- or 64-bit platform explicitly, then remove from the project the reference to SolFS5DrvNet and reinsert the correct one (i.e. specify 32-bit version for 32-bit application or 64-bit for 64-bit application).

Here is corrected project:
https://drive.google.com/file/d/0Bzz73...sp=sharing

Reply

Statistics

Topic viewed 3823 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!