D
Dmension
I have a dll that I need to use in an application that I am writing. Can
anyone point me in the direction of creating a class in my project that has
all the dllimport statements. I have used the dll but all the dll import
statements are within the same code..
Sample Code:
/// </summary>
public class Form1 : System.Windows.Forms.Form
{
[DllImport("ca3000API.dll",EntryPoint="_Initca3000")]
public static extern int
int_Initca3000();
[DllImport("ca3000API.dll", EntryPoint="_GetConnectStr")]
public static extern int int_GetConnectStr(StringBuilder CS,
ref uint CSLen);
[DllImport("ca3000API.dll",EntryPoint= "_DeInitca3000")]
public static extern int int_DeInitca3000();
[DllImport("ca3000API.dll",EntryPoint= "_BadgeOperation")]
public static extern int int_BadgeOperation(int Facility,
Int64 Badge, ref string FirstName, ref string LastName,
ref string MI, UInt16 AGNo1, UInt16 AGNo2, UInt16 AGNo3,
UInt16 AGNo4, UInt16 AGNo5, UInt16 AGNo6, UInt16 Operation);
[DllImport("ca3000API.dll", EntryPoint = "_DoorOperation")]
public static extern int int_DoorOperation(int Panel, int Door,
int Time, int Operation);
anyone point me in the direction of creating a class in my project that has
all the dllimport statements. I have used the dll but all the dll import
statements are within the same code..
Sample Code:
/// </summary>
public class Form1 : System.Windows.Forms.Form
{
[DllImport("ca3000API.dll",EntryPoint="_Initca3000")]
public static extern int
int_Initca3000();
[DllImport("ca3000API.dll", EntryPoint="_GetConnectStr")]
public static extern int int_GetConnectStr(StringBuilder CS,
ref uint CSLen);
[DllImport("ca3000API.dll",EntryPoint= "_DeInitca3000")]
public static extern int int_DeInitca3000();
[DllImport("ca3000API.dll",EntryPoint= "_BadgeOperation")]
public static extern int int_BadgeOperation(int Facility,
Int64 Badge, ref string FirstName, ref string LastName,
ref string MI, UInt16 AGNo1, UInt16 AGNo2, UInt16 AGNo3,
UInt16 AGNo4, UInt16 AGNo5, UInt16 AGNo6, UInt16 Operation);
[DllImport("ca3000API.dll", EntryPoint = "_DoorOperation")]
public static extern int int_DoorOperation(int Panel, int Door,
int Time, int Operation);