Wrox Programmer Forums
|
Beginning VB 6 For coders who are new to Visual Basic, working in VB version 6 (not .NET).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 22nd, 2005, 07:50 PM
Registered User
 
Join Date: Sep 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default USing a dll

edited-blank

Last edited by spike010101; August 12th, 2011 at 02:08 AM..
 
Old April 25th, 2005, 09:40 AM
Friend of Wrox
 
Join Date: Nov 2004
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
Default

If the function returns a string, you would
Code:
    Dim strHash     As String
    Dim MySomething As Something

    ' Put the values into MySomething that the function needs to do its job

    strHash = Getfilehash(MySomething)
    (The “something as something” is a description of how the function is created, not a sample of how it is to be used. In this case you must provide an argument to the function of the type 'something.' In the declaration of that argument [u]in the DLL</u> it is called 'something,' but you need not call it that. You can see here that I called it MySomething.) If the function returns an object, say of the type clsRtrnObj, then you would
Code:
    Dim objHash     As clsRtrnObj
Code:
    Dim MySomething As Something

    ' Put the values into MySomething that the function needs to do its job

    Set objHash = Getfilehash(MySomething)
    The obj prefix, and the str prefix have no affect in the code, but only make it easier to understand when you come back to it later to re-use it in another app, or to modify/debug it.





Similar Threads
Thread Thread Starter Forum Replies Last Post
convert unmanaged dll to managed dll nitesh kumar Visual C++ 2005 0 August 4th, 2008 04:53 AM
Install problems - VS 6.0 on XP SCRRUN.DLL PDM.DLL jeff4444 Visual C++ 0 December 6th, 2006 08:48 PM
How to convert .NET dll to COM dll used by VB 6.0 gvprashanth .NET Framework 1.x 0 December 4th, 2006 05:05 AM
The database dll crdb_oracle.dll could not be load Yeliz Crystal Reports 0 October 18th, 2006 08:12 AM
DLL & Excel - keep having to reset DLL reference! James Diamond Pro VB 6 2 May 25th, 2004 03:37 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.