G
Guest
Hi,
I need to wrap a DLL written in Cobol into a .net Dll. I am hoping of some
design guidance.
To call the Cobol DLL basically there 3 data areas that get passed into the
call.
Comm area (which contains the data returned from the call to the Cobol DLL)
Transaction area (which contains the data instructing the Cobol DLL of what
function to execute, login information, return code for success/failure).
Request area (which contains the parameter data Cobol DLL function needs).
All the areas are positional (and dynamic based on the function call) so
without a lot of work on the programers side it is difficult to make sure you
have everything set correctly so you get the required result. That is why I
am wrapping it. So other users can make a simple GetUserInfo(username) and
get a object back that contains the named members.
I have this working for some of the function. But am not sure I am designing
it correctly. I am looking at the patterns books and kind of think Facade or
Adapter. But not quite sure either of them are correct.
I expect I should have one place in the .net DLL that actually makes the
call to the DLL and in the separate functions (GetUserInfo(username)) set the
Transaction and request areas and pass them into the single call. My concern
is the comm area is pretty big (about 3000 bytes). And passing that around
may not be the best solution.
Any guidance is greatly appreciated!
Thanks,
Rich
I need to wrap a DLL written in Cobol into a .net Dll. I am hoping of some
design guidance.
To call the Cobol DLL basically there 3 data areas that get passed into the
call.
Comm area (which contains the data returned from the call to the Cobol DLL)
Transaction area (which contains the data instructing the Cobol DLL of what
function to execute, login information, return code for success/failure).
Request area (which contains the parameter data Cobol DLL function needs).
All the areas are positional (and dynamic based on the function call) so
without a lot of work on the programers side it is difficult to make sure you
have everything set correctly so you get the required result. That is why I
am wrapping it. So other users can make a simple GetUserInfo(username) and
get a object back that contains the named members.
I have this working for some of the function. But am not sure I am designing
it correctly. I am looking at the patterns books and kind of think Facade or
Adapter. But not quite sure either of them are correct.
I expect I should have one place in the .net DLL that actually makes the
call to the DLL and in the separate functions (GetUserInfo(username)) set the
Transaction and request areas and pass them into the single call. My concern
is the comm area is pretty big (about 3000 bytes). And passing that around
may not be the best solution.
Any guidance is greatly appreciated!
Thanks,
Rich