View Single Post
  #1 (permalink)  
Old May 11th, 2013, 10:49 AM
bpoole bpoole is offline
Registered User
Points: 17, Level: 1
Points: 17, Level: 1 Points: 17, Level: 1 Points: 17, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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.
Reply With Quote