Thanks raul338
have a nice day
have a nice day
Esta sección te permite ver todos los mensajes escritos por este usuario. Ten en cuenta que sólo puedes ver los mensajes escritos en zonas a las que tienes acceso en este momento.
Mostrar Mensajes Menú
Dim strFilePath As String
Dim hLibrary As Long
Dim hResource As Long
Dim hData As Long
Dim lpData As Long
' Get the path to the Resource DLL
strFilePath = "Sound.dll"
' Load the Resource DLL
hLibrary = LoadLibrary(strFilePath & Chr(0))
If hLibrary = 0 Then
MsgBox "Failed to load the specified library with error code " & Err.LastDllError
Exit Sub
End If
' Get a .WAV file from the Resource DLL
hResource = FindResource(hLibrary, "#101", "CUSTOM")
If hResource <> 0 Then
hData = LoadResource(hLibrary, hResource) 'This gets a handle to the data
If hData <> 0 Then
lpData = LockResource(hData) 'This gets a POINTER to the data... which is what we need
If lpData <> 0 Then
PlaySound ByVal lpData, 0, SND_MEMORY Or SND_NODEFAULT Or SND_SYNC
End If
End If
End If
' Close the Resource DLL
FreeLibrary hLibrary