A
Angel
I'm trying to call a DLL function that receives as parameter a user-defined
structure created by the company that made the dll.
When I call the function from my main form, I call
dllCalls.addVer("string1", "string2") -this is how I created the method in
the class. Now, in this static method that uses DllImport to read the dll,
I need to move "string1" and "string2" into a structure called PARMS_DIRS
since the only way the dll function can be executed is if I call it with a
parm of type PARMS_DIRS. In the example given by the company, they use this
code:
#include <stdlib.h>
#include <parms.h> // header file with PARMS_DIRS info
PARMS_DIRS parm; //the proprietary structure
void main(void)
{
...
memset(&parm,0, sizeof(parm));
strcpy(parm.type1, "100239"); //first string to be moved into struct
strcpy(parm.type2, "John Smith"); //second string to be moved into
struct
verName(&parm); //verName is the function in the DLL
...
}
After the function is executed, it fills the struct with other additional
info (parm.result1, parm.result2) which I need to process the employee.
How can I have access to this structure from within my C# application?
Thanks.
structure created by the company that made the dll.
When I call the function from my main form, I call
dllCalls.addVer("string1", "string2") -this is how I created the method in
the class. Now, in this static method that uses DllImport to read the dll,
I need to move "string1" and "string2" into a structure called PARMS_DIRS
since the only way the dll function can be executed is if I call it with a
parm of type PARMS_DIRS. In the example given by the company, they use this
code:
#include <stdlib.h>
#include <parms.h> // header file with PARMS_DIRS info
PARMS_DIRS parm; //the proprietary structure
void main(void)
{
...
memset(&parm,0, sizeof(parm));
strcpy(parm.type1, "100239"); //first string to be moved into struct
strcpy(parm.type2, "John Smith"); //second string to be moved into
struct
verName(&parm); //verName is the function in the DLL
...
}
After the function is executed, it fills the struct with other additional
info (parm.result1, parm.result2) which I need to process the employee.
How can I have access to this structure from within my C# application?
Thanks.