Jump to content

DllStructDelete ???


Valuater
 Share

Recommended Posts

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

Link to comment
Share on other sites

  • Developers

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

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
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

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...