怎么把这段C代码用C#完成呢?
在C#里结构体不能用指针
typedef struct {
LONG num_tables; /* number of tables */
CHAR **tables; /* table names */
CHAR *where; /* where clause */
} SE_SQL_CONSTRUCT;
LONG SE_sql_construct_alloc
(LONG num_tables,
SE_SQL_CONSTRUCT **constructor);
LONG SE_stream_query
(SE_STREAM stream,
SHORT num_columns,
const SE_SQL_CONSTRUCT *construct);
SE_SQL_CONSTRUCT sqlc;
long rc;
rc = SE_sql_construct_alloc (1, &sqlc);
sqlc->where = malloc(20);
sqlc->num_tables = 1;
strcpy (sqlc->tables[0], "cities");
strcpy (sqlc->where, "population < 10000");
num_cols = 3;
rc = SE_stream_query (Stream, num_cols, sqlc);
先感谢大家帮忙,问题解决马上揭帖,在线等!