Information générale
Catégorie:
Codage, syntaxe et commandes
Titre:
Passing arrays to dlls
Can't quite get my head around this one.
I'm having trouble using a DLL. The simple functions I can handle, but when it comes to arrays........
Documentation (VB I guess) says:
Declaration:
long IORead {long numChannels,
long *channelIDs,
float (*input)[4],
long *state }
where:
channelIDs is an array of integers (0,1,2,3)
input is a pointer to a 4096 x 4 array
and state is a pointer to a 4096 element array
I’ve tried:
DECLARE long IORead IN SomeDLL.dll ;
long numChannels, ;
string *channelIDs, ;
string *input, ;
string *state
numChannels = 4
channelIDs = CREATEBINARY( ‘0123’)
input = space(4096 x 4)
state = space(4096)
errorNo = UORead (;
numChannels, ;
*channelIDs, ;
*input , ;
*state ;
)
I get an error returned 'Invalid Array Size or Value'
Can anyone advise me what I'm doing wrong.
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement