VB调用C写的DLL
有一个C写的DLL
int RunSeries(unsigned char* lpszScrColorImg, int height,int width,int mode, LEUCCYTO1 LeucChar[]);
LEUCCYTO1 是一个结构体。
typedef struct {
double NucRough;
double cytcolor;
double diffr;
double CytoRoundness;
double CellSize;
double NucRoundness;
double NucRoundnessD;
double NucRoundnessM;
double NucSizeRate;
double discrimNuc;
double discrimCyto;
int x;
int y;
int NucCount;
int NucTotalPixel;
int MaxNuc;
int NucDiff;
int CellTotalPixel;
int size;
int meanr;
int maxr;
int minr;
int seedl;
int cellclass;
unsigned char rgb[3];
BOOL aciDoubt;
int bw_1;
}LEUCCYTO1;
在C中调用语句
unsigned char buff[1024 * 768 * 3];
cell_num = RunSeries((unsigned char*)buff, height,width,0,LeucChar1);
现在用VB 调用
Public Type LEUCCYTO1
NucRough As Double
cytcolor As Double
diffr As Double
CytoRoundness As Double
CellSize As Double
NucRoundness As Double
NucRoundnessD As Double
NucRoundnessM As Double
NucSizeRate As Double
discrimNuc As Double
discrimCyto As Double
x As Long
y As Long
NucCount As Long
NucTotalPixel As Long
MaxNuc As Long
NucDiff As Long
CellTotalPixel As Long
size As Long
meanr As Long
maxr As Long
minr As Long
seedl As Long
cellclass As Long
rgb(1 To 3) As Byte
aciDoubt As Long
bw_1 As Long
End Type
Declare Function RunSeries Lib "C:\sbtx\HemanalyDll4.dll" (ByRef lpszScrColorImg As String, ByRef height As Long, ByRef width As Long, ByRef mode As Long, ByRef LeucChar() As LEUCCYTO1) As Long
调用语句
Dim KK As String
KK = String(2359297, Chr(0))
I = RunSeries(KK, 768, 1024, 0, LeucChar1)
一直运行不了,报“VB 遇到问题需要关闭”,请高手帮忙看下是那里出了问题。
int RunSeries(unsigned char* lpszScrColorImg, int height,int width,int mode, LEUCCYTO1 LeucChar[]);
LEUCCYTO1 是一个结构体。
typedef struct {
double NucRough;
double cytcolor;
double diffr;
double CytoRoundness;
double CellSize;
double NucRoundness;
double NucRoundnessD;
double NucRoundnessM;
double NucSizeRate;
double discrimNuc;
double discrimCyto;
int x;
int y;
int NucCount;
int NucTotalPixel;
int MaxNuc;
int NucDiff;
int CellTotalPixel;
int size;
int meanr;
int maxr;
int minr;
int seedl;
int cellclass;
unsigned char rgb[3];
BOOL aciDoubt;
int bw_1;
}LEUCCYTO1;
在C中调用语句
unsigned char buff[1024 * 768 * 3];
cell_num = RunSeries((unsigned char*)buff, height,width,0,LeucChar1);
现在用VB 调用
Public Type LEUCCYTO1
NucRough As Double
cytcolor As Double
diffr As Double
CytoRoundness As Double
CellSize As Double
NucRoundness As Double
NucRoundnessD As Double
NucRoundnessM As Double
NucSizeRate As Double
discrimNuc As Double
discrimCyto As Double
x As Long
y As Long
NucCount As Long
NucTotalPixel As Long
MaxNuc As Long
NucDiff As Long
CellTotalPixel As Long
size As Long
meanr As Long
maxr As Long
minr As Long
seedl As Long
cellclass As Long
rgb(1 To 3) As Byte
aciDoubt As Long
bw_1 As Long
End Type
Declare Function RunSeries Lib "C:\sbtx\HemanalyDll4.dll" (ByRef lpszScrColorImg As String, ByRef height As Long, ByRef width As Long, ByRef mode As Long, ByRef LeucChar() As LEUCCYTO1) As Long
调用语句
Dim KK As String
KK = String(2359297, Chr(0))
I = RunSeries(KK, 768, 1024, 0, LeucChar1)
一直运行不了,报“VB 遇到问题需要关闭”,请高手帮忙看下是那里出了问题。
...全文
相关推荐
C写的DLL给C/C++和VB调用
C写的DLL给C/C++和VB调用 用c写的dll动态库,可给VB(VB6测试通过)和VC(VC6测试通过)和c和C++中调用
C语言写CRC16dll用VB调用.rar
用c写的crc16的dll用vb调用,通过
VB调用VC写的Dll,例程源码,有VB调用方法,和VC写Dll的源码
VB调用VC写的Dll,例程源码,有VB调用方法,和VC写Dll的源码
VB调用VC写的DLL返回数组
VB调用VC写的DLL返回数组,里面有VC,VB 及DLL源码
vb调用dll的各种方法
vb调用dll的各种方法,便于开发VB的高级编程。 为广大编程爱好者,方便提高编程水平。


API
