在C#应用程序中使用非托管dll [英] using unmanaged dll in c# application

查看:76
本文介绍了在C#应用程序中使用非托管dll的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好

我有以下c ++代码(库)..


Hi all

I have the following c++ code ( library )..


typedef struct bioapi_hrs_bir
{
    BioAPI_BIR_HEADER  Header;
    BioAPI_BIR_BIOMETRIC_DATA_PTR BiometricData;
    BioAPI_DATA_PTR Signature;
} BioAPI_BIR, *BioAPI_BIR_PTR;




typedef struct bioapi_bir_header
{
    uint32 Length;

} BioAPI_BIR_HEADER, *BioAPI_BIR_HEADER_PTR;


typedef uint8 BioAPI_BIR_BIOMETRIC_DATA, *BioAPI_BIR_BIOMETRIC_DATA_PTR;

typedef struct bioapi_data
{
    uint32 Length; /* in bytes */
    uint8 *Data;
} BioAPI_DATA, *BioAPI_DATA_PTR;

typedef uint32 BioAPI_RETURN;





我要发送的非托管Dll函数中的值:

现在的问题是如何从C#代码发送数据类型BioAPI_BIR_PTR的值





The function which is in unmanaged Dll to which i shud send the values :

now the problem is how can i send values of datatype BioAPI_BIR_PTR from c# code

BioAPI_RETURN BioAPI
 ConvertTemplate(
        const BioAPI_BIR_PTR        Template,
        uint8*                      ApplicationKey,
        uint32                      EncryptionKind,
        uint8*                      EncryptionKey,
        uint32                      ConvertType,
        BioAPI_BIR_PTR              NewTemplate
    );



在此先感谢
darshan



Thanks in advance
darshan

推荐答案

该开始阅读了! 将结构传递给非托管代码 [
Time to start reading! Passing Structures to unmanaged code[^]


这篇关于在C#应用程序中使用非托管dll的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆