can anyone show me the content of mtb.dll file(attached).............
to know the proper working of my project i want to know what that really written in this "mtb.dll" file.............

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Runtime.InteropServices;
namespace PROJ
{
public partial class Form1 : Form
{
public Form1()
{
[B]InitializeComponent();[/B]
}
[DllImport([B]"mtb.dll"[/B], EntryPoint = [B]"InitMotoBee")[/B]]
static extern bool [B]InitMotoBee();[/B]

[DllImport([B]"mtb.dll"[/B], EntryPoint = [B]"SetMotors"[/B])]
static extern bool [B]SetMotors(int o1, int s1, int o2, int s2, int o3, int s3, int o4, int s4, int sv);[/B]

[DllImport([B]"mtb.dll"[/B], EntryPoint = [/B]"Digital_IO"[/B])]
static extern bool [B]Digital_IO(int inputs, int outputs);[/B]

private void button_Click(object sender, EventArgs e)
{
[B]InitMotoBee();[/B]

int s1 = 0;
int s2 = 0;
int s3 = 0;
int s4 = 0;

int o1 = 0;
int o2 = 0;
int o3 = 0;
int o4 = 0;
int sv = 0;

s1 = 250;
s2 = 0;
s3 = 0;
s4 = 0;
sv = 0;

o1 = 1;
o2 = 0;
o3 = 0;
o4 = 0;

[B]SetMotors(o1, s1, o2, s2, o3, s3, o4, s4, sv);[/B]

outputs = 0;
if (DO1.Checked) 
{
outputs = outputs | 1;
}
if (DO2.Checked)
{
outputs = outputs | 2;
}
if (DO3.Checked) 
{
outputs = outputs | 4;
}
if (DO4.Checked) 
{
outputs = outputs | 8;
}


[B]Digital_IO(ref inputs, outputs);[/B]


if (((inputs & 1) == 0)) {
DIP1.Checked() = false;
} 
else 
{
DIP1.Checked() = true;
}


if (((inputs & 2) == 0)) 
{
DIP2.Checked() = false;
}
else 
{
DIP2.Checked() = true;
}

if (((inputs & 4) == 0))
{
DIP3.Checked() = false;
} 
else 
{ 
DIP3.Checked() = true;
}

if (((inputs & 8) == 0)) 
{
DIP4.Checked() = false;
} 
else 
{
DIP4.Checked() = true;
}

if (((inputs & 16) == 0)) 
{
DIP5.Checked() = false;
} 
else 
{
DIP5.Checked() = true;
}

if (((inputs & 32) == 0))
{
DIP6.Checked() = false;
}
else
{
DIP6.Checked() = true;
}

}

}

}

Edited 5 Years Ago by Jessurider: n/a

Attachments

ys............i want to see the source code within the mtb.dll file!!

Edited 5 Years Ago by Jessurider: n/a

This article has been dead for over six months. Start a new discussion instead.