How to Specify dll Loading Visual C#


hello

i have problem dll file not loading. suggested me on thread:

http://social.msdn.microsoft.com/forums/vstudio/en-us/779a3606-d6dd-4801-aa8e-e0a409707383/unable-to-load-dll-zigbeedll?prof=required

that may need specify path of dll loading correct folder (was encountering "dll not found" type of error)

i have searched forums, of dll loading cases in different languages or in different situations not applicable problem.

could inform me how change path of .dll not loading correctly in following class "correct" folder?

using system.runtime.interopservices;

namespace robotis
{
    unsafe class zigbee
    {
        public const int rc100_btn_u = 1;
        public const int rc100_btn_d = 2;
        public const int rc100_btn_l = 4;
        public const int rc100_btn_r = 8;
        public const int rc100_btn_1 = 16;
        public const int rc100_btn_2 = 32;
        public const int rc100_btn_3 = 64;
        public const int rc100_btn_4 = 128;
        public const int rc100_btn_5 = 256;
        public const int rc100_btn_6 = 512;

        [dllimport("zigbee.dll")]
        public static extern int zgb_initialize(int devindex);

        [dllimport("zigbee.dll")]
        public static extern void zgb_terminate();

        [dllimport("zigbee.dll")]
        public static extern int zgb_tx_data(int data);

        [dllimport("zigbee.dll")]
        public static extern int zgb_rx_check();

        [dllimport("zigbee.dll")]
        public static extern int zgb_rx_data();
    }    
}

zigbee.dll win32 dll, , , dependencies either needs in application's bin folder or in path.

.net call loadlibrary and windows zigbee.dll dynamic-link library search order.

david


david http://blogs.msdn.com/b/dbrowne/



Visual Studio Languages  ,  .NET Framework  >  Visual C#



Comments

Popular posts from this blog

Azure DocumentDB Owner resource does not exist

job syspolicy_purge_history job fail in sqlserver 2008

Trying to register with public marketplace error with 'Get-AzureStackStampInformation'