dkeasberry
New Member
Hi All,
I am new to progress and need to call a .NET dll that I have created within a progress program. (*.p file)
The .NET dll has been created using VS2010.
I have tried call function with the DLL from Progress code but I get the following error message :
"Could not find entry point callFuncDmlk. (3260)"
Here is my Progress code :
Here is my C#.NET code:
When trying to look at results from google searches I am starting to think if it is my DLL that I have created.
I used the regasm to register the DLL but it still gives me the error message stated above.
If I remove the CDECL I assume it uses STDCALL but I get the the error message:
Could not find entrypoint _callFuncDmlk@8. (3260)
I guess this is due to the function name being different in compiled DLL??
I have tried setting "Register for COM interop" in the build section (properties) within the .NET solution which gives me the *.TLB file.
I have even tried doing:
PROCEDURE callFuncDmlk EXTERNAL "csgDmlk.tlb":
DEF INPUT PARAM pVar1 AS CHAR.
DEF INPUT PARAM pVar2 AS CHAR.
END PROCEDURE.
but I get the error:
The application or DLL C:\Windows\system32\csgDmlk.tlb is not a valid Windows image. Please check this against you installation diskette.
I am stuck so please could you help me?
I am new to progress and need to call a .NET dll that I have created within a progress program. (*.p file)
The .NET dll has been created using VS2010.
I have tried call function with the DLL from Progress code but I get the following error message :
"Could not find entry point callFuncDmlk. (3260)"
Here is my Progress code :
Code:
PROCEDURE callFuncDmlk EXTERNAL "csgDmlk.dll" CDECL:
DEF INPUT PARAM pVar1 AS CHAR.
DEF INPUT PARAM pVar2 AS CHAR.
END PROCEDURE.
DEF VAR sVar1 AS CHAR.
DEF VAR sVar2 AS CHAR.
ASSIGN sVar1 = "Testing2"
sVar2 = "HERE we are2".
RUN CallFuncDmlk (sVar1, sVar2).
Here is my C#.NET code:
Code:
namespace csgDmlk
{
public interface icsgDmlk
{
void callFuncDmlk(string sVar1, string sVar2);
}
public class csgDmlk: icsgDmlk
{
public void callFuncDmlk(string sVar1, string sVar2)
{
string mydocpath = "C:\\temp\\Derek\\";
string myfile = "DLLOutput.txt";
System.IO.StreamWriter objWriter;
objWriter = new System.IO.StreamWriter(mydocpath + myfile);
objWriter.Write("Inputing Var1: " + sVar1);
objWriter.Write("Inputing Var2: " + sVar2);
objWriter.Close();
}
}
}
When trying to look at results from google searches I am starting to think if it is my DLL that I have created.
I used the regasm to register the DLL but it still gives me the error message stated above.
If I remove the CDECL I assume it uses STDCALL but I get the the error message:
Could not find entrypoint _callFuncDmlk@8. (3260)
I guess this is due to the function name being different in compiled DLL??
I have tried setting "Register for COM interop" in the build section (properties) within the .NET solution which gives me the *.TLB file.
I have even tried doing:
PROCEDURE callFuncDmlk EXTERNAL "csgDmlk.tlb":
DEF INPUT PARAM pVar1 AS CHAR.
DEF INPUT PARAM pVar2 AS CHAR.
END PROCEDURE.
but I get the error:
The application or DLL C:\Windows\system32\csgDmlk.tlb is not a valid Windows image. Please check this against you installation diskette.
I am stuck so please could you help me?