EldoS | Feel safer!

Software components for data protection, secure storage and transfer

RAWDISK drver install

Also by EldoS: MsgConnect
Cross-platform protocol-independent communication framework for building peer-to-peer and client-server applications and middleware components.
#19468
Posted: 03/15/2012 15:11:14
by Stephen Gillespie (Basic support level)
Joined: 03/15/2012
Posts: 8

Im having a problem getting the driver to install using VS2010/C#/.Net4

Code
using RawDisk;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace installer
{
    class Program
    {
        static bool success = false;
        static void Main(s tring[] args)
        {
            string drvpath = "\\\\C:\\Program Files (x86)\\EldoS\\RawDisk\\Drivers\\debug\\64bit\\ia64\\elrawdsk.sys";
            string appname = "installer";
            bool result = CRawDisk.InstallDriver(drvpath, appname, ref success);
            if (result != true)
            {
                Console.WriteLine("The driver says NO!");
            }
            else
            {
                Console.WriteLine("All good Boss!");
            }
            Console.WriteLine(Convert.ToS tring(success));
            Console.ReadKey();
        }
    }
}


I used the above code as a simple test to install a driver but without success

Any advice would be greatly appreciated

Thanks in advance!
#19469
Posted: 03/15/2012 15:21:19
by Volodymyr Zinin (EldoS Corp.)

What version of Windows are you using? In the case of Vista and later the installer must be run elevated (i.e. "run as admin").
Also check the error which GetLastError returns.
#19470
Posted: 03/15/2012 15:24:55
by Stephen Gillespie (Basic support level)
Joined: 03/15/2012
Posts: 8

Hi its Win7 and I have "Run as Administrator". Will check the error. thanks
#19471
Posted: 03/15/2012 15:41:38
by Stephen Gillespie (Basic support level)
Joined: 03/15/2012
Posts: 8

Hmm it says the error is 0 using

Code
using RawDisk;
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Linq;
using System.Text;

namespace installer
{
    class Program
    {
        static bool success = false;
        static void Main(s tring[] args)
        {
            string drvpath = "\\\\C:\\Program Files (x86)\\EldoS\\RawDisk\\Drivers\\debug\\64bit\\ia64\\elrawdsk.sys";
            string appname = "installer";
            bool result = CRawDisk.InstallDriver(drvpath, appname, ref success);
            if (result != true)
            {
                Console.WriteLine("The driver says NO!");
                Console.WriteLine(Marshal.GetLastWin32Error());
            }
            else
            {
                Console.WriteLine("All good Boss!");
            }
            Console.WriteLine(Convert.ToS tring(success));
            Console.ReadKey();
        }
    }
}


Can this be right? Its obviously possible my bad coding skills are to blame!
#19472
Posted: 03/15/2012 15:43:12
by Volodymyr Zinin (EldoS Corp.)

Quote
Stephen Gillespie wrote:
string drvpath = "\\\\C:\\Program Files (x86)\\EldoS\\RawDisk\\Drivers\\debug\\64bit\\ia64\\elrawdsk.sys";

Perhaps the error is here. You are trying to install the driver for Itanium platform.
#19474
Posted: 03/15/2012 16:09:26
by Stephen Gillespie (Basic support level)
Joined: 03/15/2012
Posts: 8

Hi sorry, yeah I have tried all 3 drivers its just that is the last one I tried.

Thanks for your help
#19475
Posted: 03/15/2012 17:15:33
by Stephen Gillespie (Basic support level)
Joined: 03/15/2012
Posts: 8

I have tried all of the drivers to try and get something out of this but without luck. There is something about the process I am missing.

cheers
#19477
Posted: 03/16/2012 00:54:43
by Eugene Mayevski (EldoS Corp.)

And what the actual error [code] is?


Sincerely yours
Eugene Mayevski
#19478
Posted: 03/16/2012 01:02:29
by Eugene Mayevski (EldoS Corp.)

You call GetLastError after a call to WriteLine, and you get the error code of WriteLine (of the API function behind it). You need to call GetLastError immediately after "if (result != true)"


Sincerely yours
Eugene Mayevski
#19491
Posted: 03/16/2012 07:49:10
by Stephen Gillespie (Basic support level)
Joined: 03/15/2012
Posts: 8

Hello, yes that makes sense, what am idiot!

The error code now reads as 2.

Thanks
Also by EldoS: CallbackRegistry
A component to monitor and control Windows registry access and create virtual registry keys.

Reply

Statistics

Topic viewed 11084 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!