p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Pro VB 6 (http://p2p.wrox.com/forumdisplay.php?f=73)
-   -   Create class object (http://p2p.wrox.com/showthread.php?t=90033)

bpoole May 11th, 2013 10:49 AM

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.


All times are GMT -4. The time now is 01:52 AM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.