• Introducing Dark Mode! Switch by clicking on the lightbulb icon next to Search or by clicking on Default style at the bottom left of the page!

Call C# DLL from a JDE C BSFN

vr_cal

Member
Hello,

We have a need to manipulate the Active Directory Network properties and therefore, i wrote a C# DLL to do the same. I am calling the DLL from a C BSFN in the standard way (LoadLib, GetProcAddress, etc.). However, when i call the actual function and pass strings, the C function crashes. If I pass integers to the C# DLL, no issues. It is only for strings that i have the issue. Any thoughts? If somebody can post a small example of what could be done here, it is very much appreciated.

Kind Regards,
Venkat
 

vr_cal

Member
Hello Hari,

Many thanks for your reply. This is what i am doing: I take the lpDS string parameters and strcpy them to char strings. I pass the char strings to the C# function.

That being said, based on your 1st option: when you said that it requires the assembly COM visible, i am not sure what you meant by that.

On your 2nd solution regarding creating the Console app, will the Console app come up on the screen when i call it from the JDE C BSFN? I would rather it not come up. I have several functions that i would like to build inside the C# function. If i get an idea on an easy and clean approach, i can apply the same everywhere.

Would you have some time to walk me through the options and building one single call? Please let me know and we can do a webex . I appreciate your help in advance.

Kind Regards,
Venkat
 
Top