class xyz{
public void somefunction{
if(this.folderBrowserDialog1.ShowDialog() == DialogResult.OK)
{
m_varFolderPath = this.folderBrowserDialog1.SelectedPath;
m_varFolderPath += "\\Iamlucky.txt";
System.String a =(String)strVariable1;
System.String b =(String)strVariable2;
System.String c =(String)m_varFolderPath;
try
{
/* DidData is the dll export method created in class clsCallDllBackup*/
if(clsCallDllBackup.DigData(a,b,c))
MessageBox.Show("yyyyyyyyyyyyy");
else
MessageBox.Show("00000000");
}
catch
{
MessageBox.Show("xxxxxxxxxx");
}
}
}//end of function
}//end of class
public class clsCallDllBackup
{
public clsCallDllBackup()
{
}
[DllImport("DigInfo.dll", EntryPoint="ExtractJobDigData")]
public static extern bool DigData(String strProjectName,String strJobName,String strFilepathname);
}
problem: the intended exported dll function 'DigDat'(unmanaged code) is not creating a binary text file on a
choosen folder, Iam calling the DLL exported function from managed code.
description:
I created a class for the dll as class clsCallDllBackup which is having the prototype
for exported fuction ExtractJobDigData.
Diginfo.dll will creat a txt file with binary information in selected folder, but in c# the
selected path will be as @"D:\\somefolder\\mylucky.txt",
but the input folderpath for the dll function will be as "D:\\somefolder\\mylucky.txt" without
the symbol "@", is it any problem for the dll function in creating the text file on my choosen folder
how to give the input to dll exported function without "@" ie, as "D:\\somefolder\\mylucky.txt"
the signature of dll export function is ExtractJobDigData(LPSTR strVariable1,LPSTR strVariable2,LPSTR m_varFolderPath)
when i run the program iam getting the true statement MessageBox.Show("yyyyyyyyyyyyy"); but the required out put of the
dll ie, a text file is not getting created on the choosen folder