vb怎么调用c++生成的动态链接库,就是vb开发sdk
#ifndef __COM_TYPE_H__#define __COM_TYPE_H__
#ifdef COM_OS_LINUX
#define AVDSDK_API __attribute ((visibility("default")))
#define AVDSDK_APICALL
#elif defined COM_OS_ANDROID
#define AVDSDK_API
#define AVDSDK_APICALL
#elif defined AVDLIB_LIB
#define AVDSDK_API
#define AVDSDK_APICALL
#else
#define AVDSDK_API __declspec(dllexport)
#define AVDSDK_APICALL __stdcall
#endif
#ifdef __cplusplus
#if __cplusplus
extern "C"{
#endif
#endif /* __cplusplus */
typedef unsigned char COM_U8;
typedef unsigned char COM_UCHAR;
typedef unsigned short COM_U16;
typedef unsigned int COM_U32;
typedef signed char COM_S8;
typedef short COM_S16;
typedef int COM_S32;
#ifndef _M_IX86
typedef unsigned long long COM_U64;
typedef long long COM_S64;
#else
typedef __int64 COM_U64;
typedef __int64 COM_S64;
#endif
typedef char COM_CHAR;
typedef char* COM_PCHAR;
typedef float COM_FLOAT;
typedef double COM_DOUBLE;
typedef void COM_VOID;
typedef unsigned long COM_SIZE_T;
typedef unsigned long COM_LENGTH_T;
typedef unsigned long COM_ULONG;
typedef long COM_LONG;
typedef enum {
COM_FALSE = 0,
COM_TRUE = 1,
}COM_BOOL;
#ifndef NULL
#define NULL 0L
#endif
#define COM_NULL 0L
#define COM_NULL_PTR 0L
#define COM_SUCCESS 1
#define COM_FAILURE 0
#define COM_NOIMPLEMENT 0
#ifdef __cplusplus
#if __cplusplus
}
#endif
#endif /* __cplusplus */
#endif /* __COM_TYPE_H__ */
这是头文件
#ifndef _COM_AVD_DEV_SDK_H_
#define _COM_AVD_DEV_SDK_H_
#include "com_type.h"
#include <vector>
using std::vector;
#ifdef __cplusplus
extern "C"
{
#endif
/************************************** IMPELEMENTED ***********************************************/
AVDSDK_API COM_S32 AVDSDK_APICALL COM_AVD_DEV_Init();
AVDSDK_API COM_S32 AVDSDK_APICALL COM_AVD_DEV_DeInit();
AVDSDK_API COM_S32 AVDSDK_APICALL COM_AVD_DEV_OpenCamera(COM_LONG* plDeviceHandle,
const COM_CHAR* psSturnIp, COM_S32 iSturnPort,
const COM_CHAR* psTurnIp, COM_S32 iTurnPort,
const COM_CHAR* psRelayIp, COM_S32 iRelayPort,
const COM_CHAR* psUsername, const COM_CHAR* psPassword,
const COM_CHAR* psDeviceIp, COM_S32 iDevicePort,
COM_S32 iMode, COM_U32 u32_connectype, COM_U32 u32ChannelID);
AVDSDK_API COM_S32 AVDSDK_APICALL COM_AVD_DEV_OpenCameraByDDNS(COM_LONG* plDeviceHandle,
const COM_CHAR* pzDDNSServer,
const COM_CHAR* pzDDNSName,
COM_S32 iDisplayMode, COM_U32 u32_channelid = 1);
AVDSDK_API COM_S32 AVDSDK_APICALL COM_AVD_DEV_OpenCameraByDDNSV2(COM_LONG* plDeviceHandle,
const COM_CHAR* pzDDNSServer,
const COM_CHAR* pzDDNSName,
const COM_CHAR* pzUserName,
const COM_CHAR* pzPassword,
COM_S32 iDisplayMode,
COM_U32 u32_channelid = 1);
AVDSDK_API COM_S32 AVDSDK_APICALL COM_AVD_DEV_OpenCameraByDistribute(COM_LONG* plDeviceHandle,
const COM_CHAR* pzDDNSServer,
const COM_CHAR* pzDDNSName,
const COM_CHAR* pzUserName,
const COM_CHAR* pzPassword,
int iCameraID,
int iMode = 1);
AVDSDK_API COM_S32 AVDSDK_APICALL COM_AVD_DEV_CloseCamera(COM_LONG lDeviceHandle);
AVDSDK_API COM_S32 AVDSDK_APICALL COM_AVD_DEV_StartListen(COM_LONG lDeviceHandle);
AVDSDK_API COM_S32 AVDSDK_APICALL COM_AVD_DEV_StopListen(COM_LONG lDeviceHandle);
AVDSDK_API COM_S32 AVDSDK_APICALL COM_AVD_DEV_StartVoice(COM_LONG lDeviceHandle);
AVDSDK_API COM_S32 AVDSDK_APICALL COM_AVD_DEV_StopVoice(COM_LONG lDeviceHandle);
这也是
Private Declare Sub COM_AVD_DEV_Init Lib "RayNetSdk.dll" Alias "_COM_AVD_DEV_Init@0" ()这是我的声明,看看我的申明哪有问题啊