Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Passing a String to a DLL
Message
 
À
24/04/2001 15:20:07
Information générale
Forum:
Visual Basic
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00499201
Message ID:
00499390
Vues:
22
>Hi,
>
>Here's how I declared my external DLL function in my VB program:
>
<CODE>
>Private Declare Function make_call _
>  Lib "e:\programmes\visual basic\sync\system_call.dll" _
>  (ByRef thecommand As String) As Integer
></CODE>
>It seems about right but whenever I try to call my 'make_call' function, I get the following error message:
>
>'Incorrect dll call (error 49)'
>
>Here is an example of how I call 'make_call':
>
<CODE>
>nCurrentProc = make_call(cCommand) 'cCommand is a String var and is not empty
></CODE>
>
>What am I doing wrong?
>
>Stephane.

Have you tried declaring the paramater ByVal?

Is this DLL written in VB?
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform