I have a C DLL that I am call from C# C Code
// The real DLL entry point
//int __export CALLBACK Do_7plus(char *cmd_line)
__declspec(dllexport) int Do_7plus(char *cmd_line)
C# Code
using System;
using System.Windows.Forms;
using System.Runtime.InteropServices; // DLL support
namespace Packet
{
public partial class _7PlusFrm : Form
{
[DllImport("7plus.dll")]
public static extern void Do_7plus(string args);
public _7PlusFrm()
{
InitializeComponent();
}
private void button_ok_Click(object sender, EventArgs e)
{
Do_7plus("c:\\temp\\7plus.zip -SAVE \"c:\temp\\\" -SB 5000");
}
}
}
I get a exception error (Access Violation) How do I fix it?
Aucun commentaire:
Enregistrer un commentaire