Sign in to follow this  
Followers 0
Valuater

DllStructDelete ???

5 posts in this topic

#1 ·  Posted (edited)

i dont know nada about Dll... but

this use to work

#include <GUIConstants.au3>

Func _SoundGetWaveVolume()
    Local $WaveVol = -1, $p, $ret
    Const $MMSYSERR_NOERROR = 0
    $p = DllStructCreate ("dword")
    If @error Then
        SetError(2)
        Return -2
    EndIf
    $ret = DllCall("winmm.dll", "long", "waveOutGetVolume", "long", -1, "long", DllStructGetPtr ($p))
    If ($ret[0] == $MMSYSERR_NOERROR) Then
        $WaveVol = Round(Dec(StringRight(Hex(DllStructGetData ($p, 1), 8), 4)) / 0xFFFF * 100)
    Else
        SetError(1)
    EndIf
    DllStructDelete ($p)
    Return $WaveVol
EndFunc;==>_SoundGetWaveVolume

now i get this error

C:\Program Files\AutoIt3\Examples\My Stuff\volume.au3 (19) : ==> Unknown function name.:

DllStructDelete ($p)

^ ERROR

no "create" erorrs were noted?

8)

Edited by Valuater

NEWHeader1.png

Share this post


Link to post
Share on other sites



so... replace it ... with what

or just remove it??

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

07th December, 2005 - v3.1.1.93 (beta)

Updated : Include beta files are also stored in separate folders to anticipate no destruction of released includes as today.

Added : GUICtrlGetHandle(). (by Holger)

Fixed : DLLStruct... return 1 on error.

Removed : DLLStructDelete($Struct) use $Struct=0 even nothing if it is local.

Updated : Fatal error message if DLLCall cannot be executed.

Fixed : FileRead in raw mode return error. (Thanks VicTT)

Updated : DLLStructCreate can contain space. (Thanks LxP)

Fixed : FileRead no count non empty file. (Thanks AutoIt Smith)

Fixed : Background label not firing when overlayed by an edit control. (Thanks livewire)

Fixed : FileOpen() doc typo. (Thanks Zedna)

Fixed : TraySetToolTip can be up to 128 with 2000/XP/2003. (by Holger)

Fixed : GUI updown control notification if change with keyboard. (Thanks Lemmens Peter)

Updated : Window title doc precision (not perfect). (Thanks MikeOsdx)

:P

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

so... replace it ... with what

or just remove it??

8)

if it is a local variable it will be deleted on exit of the function or reaffectation of the variable.

If you want to release resources used at creation time $struct=0 will do it too.

:P

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

if it is a local variable it will be deleted on exit of the function or reaffectation of the variable.

If you want to release resources used at creation time $struct=0 will do it too.

:P

worked great

thanks

8)

Edited by Valuater

NEWHeader1.png

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