I.T. Discussion Community!
-Collapse +Expand
VB Classic
Search VB Classic Group:

Advanced
-Collapse +Expand VB Classic Store

Prestwood eMagazine

September Edition
Subscribe now! It's Free!
Enter your email:

   ► MB LobbyVisual Basic Classic BoardVB Classic Other Topic   Print This     

calling C dll from VB6: parameter passing

calling C dll from VB6: parameter passing in VB Classic Other topic (part of our Visual Basic Classic group).

Quick Search: calling   parameter   passing   calling C   calling C dll   VB6 parameter  
rez1
Minnesota, USA
Hi,
I am calling a C dll function from VB6. It's not showing any error when linking to the dll and the function is called properly. But when I print the parameter values inside the dll function, correct values are not found.

the C function prototype is:
void Analyze_Data (char* goldFile, char* capturedFile, int tolerance);

I am calling from VB as:

Private Declare Function Analyze_Data _
Lib "U:\new-Viewer\Viewer\analysis1.dll" ( _
ByVal gold_file_name As String, _
ByVal capture_file_name As String, _
ByVal Tolerance As Long _
)

Analyze_Data(gfile, capfile, tol)

When I print the values from the dll function, the first parameter is always emtpy, the second parameter is getting the value of the actual first parameter that is passed and third parameter is garbage.

Please let me know if anyone knows why the parameters are not passed properly.
 Posted 17 years ago (Thread Starter)
Comment Quote
About rez1 -Collapse +Expand
Visit Profile
Membership pending.
Member subscribes to this thread but email is NOT VERIFIED.
Email Not Verified!
Once email is verified, we will review and approve the account.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Post ID #7212, 1 replies
Thread Started 8/6/2002 1:04:00 PM
View Counter=5056
Last Reply Posted 10/11/2002 12:25:00 AM)
Location=Minnesota, USA  
Joined=17 years ago   MB Posts=1  
Most Recent Post
RobZ
 (Inactive)
JHB, South Africa
Elementry my dear watson, Now that
Vb Strings & C Strings are not the same Eek!

Check out the following page for a better explanation


Old UBB Archived Link: [URL=http://www.mvps.org/vb/hardcore/html/fixed-lengthstringsinudts.htm]Strings [/URL]


http://www.mvps.org/vb/hardcore/html/fixed-lengthstringsinudts.htm

Hope this helps
 Posted 17 years ago
Comment Quote
About RobZ -Collapse +Expand
Visit Profile
Inactive member.
Member does not subscribe to this thread.
Email Not Verified!
Once email is verified, we will review and approve the account.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Post ID #7880 (Level 1.1)  Reply to 7212
Thread Started 10/11/2002 12:25:00 AM
View Counter=2
Location=JHB, South Africa  
Joined=18 years ago   MB Posts=9  

Revive Thread!

Add a comment to revive this old thread and make this archived thread more useful.

Write a Comment...
Full Editor
...
Sign in...

If you are a member, Sign In. Or, you can Create a Free account now.


Anonymous Post (text-only, no HTML):

Enter your name and security key.

Your Name:
Security key = P1151A1
Enter key:
Icon: A Post    Thread    Idea    Important!    Cool    Sad    No    Yes    Includes a Link...   
Thread #7212 Counter
5056
Since 4/2/2008

Follow PrestwoodBoards on: 


©1995-2019 PrestwoodBoards  [Security & Privacy]
Professional IT Services: Coding | Websites | Computer Tech