VC定义结构体如下:
typedef struct STRU_TAG_NODE{
long  lTagID;
     char  szTagSource[128];
     float  fExcDev;
long  lRefTimer;
long  lMaxInterval;
WORD  cTagType;
     WORD  cIOState;
     long lTimestamp; 
     long cTagState; 
union{
float  fValue;   
         long lValue;
BOOL bValue;
char szValue[128];
};
}TAG_NODE, *LPTAGNODE;
函数声明如下
long __declspec(dllexport)  __stdcall DRTDB_FindTagBySource(LPSTR sourcename, TAG_NODE &tagnode);在vb中,我定义了结构:
Private Type TAG_NODE
    lTagID As Long
    szTagSource(128) As Byte
    fExcDev As Single
    lRefTimer As Long
    lMaxInterval As Long
    cTagType As Integer
    cIOState As Integer
    lTimestamp As Long
    cTagState As Long
    szValue(128) As Byte
End Type
该函数的声明:
Private Declare Function DRTDB_FindTagBySource Lib "XXXX.dll" (ByVal sourcename As String, ByRef TagNode As TAG_NODE) As Long函数可以调用,
DIM aNode as TAG_NODE
LResult = DRTDB_FindTagBySource(sFirst, aNode)
但调用后,aNode 变量并未发生改变,是不是在VB对VC的结构体及联合体变量的使用有特殊的限制?
请高人指点!!!