Information générale
Catégorie:
Fonctions API de Windows
Titre:
Correct VB5 declaration of C dll
Hi!
I am designing routines in C to speed up a VB application. One of them involves an array of strings. I would like to know what is the correct declaration in VB for my C routine. All my routines are stored in a DLL.
-C declaration:
int _stdcall ChArray (LPTSTR *s1, int d);
-VB declaration:
Declare Function ChArray Lib "c:\project\dll\debug\testvb\dll.dll" _
(????? Str1 As ??????, ByVal dimen As Long) As Long
Explanation:
In the C routine, s1 is an array of strings.
When I work with regular strings (LPTSTR), I have no problem modifying and returning the string. But when I tried to modify an array of strings (LPTSTR *), well, there is something I am missing. So maybe just my declaration isn't correct in VB, or maybe the way I'm declaring it on the C side isn't correct either.
P.J
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