G
gregarican
I am trying to port a legacy CTI application written in another
programming language to C# 2005. From my initial research into it I
see I can utilize the DllImport method to tap into the DLL file (which
is CTSA32.DLL). From there I have documented API for the various C
methods that are invoked, most all of which have an in and an out. You
pass in a data structure and get a data structure returned back.
What's the most straightforward way of mimicing the packed pointers
that are in these C data structures? The other data types I think I
have a handle on. Most of them are unsigned short or else enums. But
the packed pointers seems to be another matter? Here's a sample data
structure that opens the initial CTI session stream:
#include <acs.h>
#include <csta.h>
RetCode_t acsOpenStream(
ACSHandle_t *acsHandle, /* RETURN */
InvokeIDType_t invokeIDType, /* INPUT */
InvokeID_t invokeID, /* INPUT */
StreamType_t streamType, /* INPUT */
ServerID_t *serverID, /* INPUT */
LoginID_t *loginID, /* INPUT */
Passwd_t *passwd, /* INPUT */
AppName_t *applicationName, /* INPUT */
Level_t acsLevelReq /* INPUT */
Version_t *apiVer, /* INPUT */
unsigned short sendQSize, /* INPUT */
unsigned short sendExtraBufs, /* INPUT */
unsigned short recvQSize, /* INPUT */
unsigned short recvExtraBufs /* INPUT */
PrivateData_t *privateData); /* INPUT */
How do I create a C# struct that contains members that are packed
pointers?
programming language to C# 2005. From my initial research into it I
see I can utilize the DllImport method to tap into the DLL file (which
is CTSA32.DLL). From there I have documented API for the various C
methods that are invoked, most all of which have an in and an out. You
pass in a data structure and get a data structure returned back.
What's the most straightforward way of mimicing the packed pointers
that are in these C data structures? The other data types I think I
have a handle on. Most of them are unsigned short or else enums. But
the packed pointers seems to be another matter? Here's a sample data
structure that opens the initial CTI session stream:
#include <acs.h>
#include <csta.h>
RetCode_t acsOpenStream(
ACSHandle_t *acsHandle, /* RETURN */
InvokeIDType_t invokeIDType, /* INPUT */
InvokeID_t invokeID, /* INPUT */
StreamType_t streamType, /* INPUT */
ServerID_t *serverID, /* INPUT */
LoginID_t *loginID, /* INPUT */
Passwd_t *passwd, /* INPUT */
AppName_t *applicationName, /* INPUT */
Level_t acsLevelReq /* INPUT */
Version_t *apiVer, /* INPUT */
unsigned short sendQSize, /* INPUT */
unsigned short sendExtraBufs, /* INPUT */
unsigned short recvQSize, /* INPUT */
unsigned short recvExtraBufs /* INPUT */
PrivateData_t *privateData); /* INPUT */
How do I create a C# struct that contains members that are packed
pointers?