Anderson Matos
unread,Mar 18, 2013, 7:43:42 PM3/18/13You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
Hello,
I'm trying to call some functions that where built using Clarion within my C# code for some app interop and data exchange.
I'm not into the "create an EXE and call it with parameters" so there is no point into answering this. I know that it works but it has some side-effects that I can't afford.
Here is how the function was created:
-- MultiDLL solution.
-- Global.App (the glogal project that is referenced everywhere and holds dictionary into).
1. Inside Global.App, I've created a New Procedure with:
- Name: GetNumber
- Procedure Type: ClassABC Source Procedure
- Prototype: (long num),LONG,PASCAL
- Actions > Parameters: (long num)
- Declare global: true
- Export: true
2. Inside this procedure, within Embeds > Processed Code, I've placed a Source with this code:
MESSAGE('Just a test')
RETURN(150)
3. Compiled just fine.
4. On the .NET startup project, I've placed:
[DllImport(@"C:\Dev\Clarion8\P1\BuildRelease\Global.dll", EntryPoint = "GETNUMBER")]
public static extern int GetNumber(int num);
static void Main()
{
int result = GetNumber(10);
}
--
Running this code throws an exception saying that the DLL could not be loaded because the entrypoint was not found.
I've triple-checked the EntryPoint within DependencyWalker and LibMaker and the generated name is "GETNUMBER" (upper case on both).
Other DLL (from Windows API, Delphi, C and C++) work pretty fine.
Just this one from Clarion that does not work at all.
Any clue why?