Sign in to follow this  
Followers 0
MISIIM

COM Pointer

4 posts in this topic

I have a method of a COM object that needs to accept a pointer. (This is an iTunes hotkey program.) How would I do this or is it not possible?

Func VolUp()

Local $volume = DllStructCreate("long");

$itunes.SoundVolume(DllStructGetPtr($volume, 1));

Dim $newvol = DllStructGetData($volume, 1) + 10;

If $newvol > 100 Then $newvol = 100;

MsgBox(0, "", $newvol);

$itunes.SoundVolume($newvol);

$volume = 0;

EndFunc

Share this post


Link to post
Share on other sites



I don't see the need for a pointer. Take a look at this program, it uses iTunes COM extensively and is commented fairly well.

Share this post


Link to post
Share on other sites

Thank you. I guess SoundVolume should be used like a property.

Share this post


Link to post
Share on other sites

Thank you. I guess SoundVolume should be used like a property.

Your welcome. Yes it would be something like...

$iVolume = $oiTunes.SoundVolume; retrieve the current volume
$oiTunes.SoundVolume = 50; set the volume

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0