elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Security Series.XSS. [Cross Site Scripting]


+  Foro de elhacker.net
|-+  Programación
| |-+  Programación General
| | |-+  .NET (C#, VB.NET, ASP)
| | | |-+  Programación Visual Basic (Moderadores: LeandroA, seba123neo)
| | | | |-+  Reproducir WAV
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: Reproducir WAV  (Leído 1,623 veces)
yeikos


Desconectado Desconectado

Mensajes: 1.424



Ver Perfil
Reproducir WAV
« en: 31 Mayo 2006, 00:38 am »

Este es el código

Código:
Declare Function mciExecute Lib "winmm.dll" (ByVal lpstrCommand As String) As Long
Private Sub Form_Load()
iResult = mciExecute("Play c:\carpeta 1\setup0.wav")
End Sub

El problema es que no reconoce la ruta porque encuentra un espacio, alguna solucion para arreglarlo? u otra manera de reproducir archivos wav?


En línea

Red Mx
Rojito
Colaborador
***
Desconectado Desconectado

Mensajes: 3.649


Viva México Cabrones...


Ver Perfil WWW
Re: Reproducir WAV
« Respuesta #1 en: 31 Mayo 2006, 01:11 am »

si basicamente si quieres ejecutar esa pista

Código:


Option Explicit

Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long

Const SW_NORMAL = 1
Private Sub Form_Load()
Dim X
   X = ShellExecute(Me.hwnd, "Open", "c:\carpeta 1\setup0.wav", &O0, &O0, SW_NORMAL)


End Sub



Saludos Red Mx!!!


En línea

Desarrollar Malware Es Causa De Cancer...
NYlOn


Desconectado Desconectado

Mensajes: 842


OOOOHHHHHH, TARAGÜIIII xDDDDDD


Ver Perfil WWW
Re: Reproducir WAV
« Respuesta #2 en: 31 Mayo 2006, 03:47 am »

Intenta poniendo:
Código:
Declare Function mciExecute Lib "winmm.dll" (ByVal lpstrCommand As String) As Long
Private Sub Form_Load()
iResult = mciExecute("Play c:\carpeta~1\setup0.wav")
End Sub

Saludos.-
En línea

yeikos


Desconectado Desconectado

Mensajes: 1.424



Ver Perfil
Re: Reproducir WAV
« Respuesta #3 en: 31 Mayo 2006, 15:49 pm »

Ya encontré la solución buscando por el foro:

Código:
Public Const SND_APPLICATION = &H80         '  look for application specific association
Public Const SND_ALIAS = &H10000     '  name is a WIN.INI [sounds] entry
Public Const SND_ALIAS_ID = &H110000    '  name is a WIN.INI [sounds] entry identifier
Public Const SND_ASYNC = &H1         '  play asynchronously
Public Const SND_FILENAME = &H20000     '  name is a file name
Public Const SND_LOOP = &H8         '  loop the sound until next sndPlaySound
Public Const SND_MEMORY = &H4         '  lpszSoundName points to a memory file
Public Const SND_NODEFAULT = &H2         '  silence not default, if sound not found
Public Const SND_NOSTOP = &H10        '  don't stop any currently playing sound
Public Const SND_NOWAIT = &H2000      '  don't wait if the driver is busy
Public Const SND_PURGE = &H40               '  purge non-static events for task
Public Const SND_RESOURCE = &H40004     '  name is a resource name or atom
Public Const SND_SYNC = &H0         '  play synchronously (default)
Public Declare Function PlaySound Lib "winmm.dll" Alias "PlaySoundA" (ByVal lpszName As String, ByVal hModule As Long, ByVal dwFlags As Long) As Long

PlaySound "C:\carpeta 1\ding.wav", ByVal 0&, SND_FILENAME Or SND_ASYNC

Gracias de todas maneras ;)
« Última modificación: 31 Mayo 2006, 16:00 pm por YeIk0s » En línea

Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
reproducir vulnerabilidad inyeccion sql en php
Nivel Web
Erfiug 1 3,689 Último mensaje 17 Mayo 2011, 20:06 pm
por luiggy2
Reproducir con lyrics
Software
huerto123 1 1,411 Último mensaje 5 Enero 2019, 18:17 pm
por MCKSys Argentina
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines