Wrox Programmer Forums
Pro VB 6 For advanced Visual Basic coders working in version 6 (not .NET). Beginning-level questions will be redirected to other forums, including Beginning VB 6.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro 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 May 11th, 2013, 10:49 AM
Registered User
Join Date: May 2013
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Create class object

Trying to create vb6 app to reference a dll that controls a tuner card. I would like to be able to get the current channel number. I have referenced the dll under project references. I setup a declare statement as follows:

Declare Function IHCWTuneRequest Lib "tunercard.dll" (ByRef retval As Long) As Long

When called I get argument no optional. When I view the dll in ole viewer I can see that IHCWTuneRequest is a class that contains a method get_ChannelNumber. The channel number shows the following:
HRESULT_stdcall get_ChannelNumber([out,retval] unsigned long*retval);

I know I have something wrong but not sure what. The IHCWTuneRequest is shown as a class and get_ChannelNumber as a member of the class in the object browser. I have also tried to sub get_ChannelNumber in place of the IHCWTuneRequest in the declare statement and still get the error. Any adivice will be appreciated.

Similar Threads
Thread Thread Starter Forum Replies Last Post
Lesson 2 - can not create Class BubNorth BOOK: Java Programming 24-Hour Trainer by Yakov Fain 1 March 4th, 2012 09:44 PM
CANNOT CREATE A DATAROW OBJECT FROM A DATASET OBJECT brucechess BOOK: Beginning VB.NET Databases 2 March 20th, 2009 10:14 AM
Getting the object name within a class Koeno VB.NET 5 July 15th, 2008 01:52 PM
create a Line object ,Box object in CR at Runtime? thanhnt Pro VB 6 1 May 16th, 2005 06:51 AM
Cannot create a new class from VS 2k3 r_ganesh76 General .NET 0 November 3rd, 2004 05:21 AM

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