Título: Load wav file from res in a dll Publicado por: ntaryl en 18 Enero 2010, 19:56 pm Good evening
I try this time to load a res wav file from dll .but no luck use this example but i dont know what the wrong i successed to load from main project and after try from dll but something is wrong someone can point me to the correct way Título: Re: Load wav file from res in a dll Publicado por: ssccaann43 © en 18 Enero 2010, 20:39 pm You need to upload the file .RES in the project and then want to upload .DLL file?
I do not know much you need to do. Do you have a source? Título: Re: Load wav file from res in a dll Publicado por: el_c0c0 en 18 Enero 2010, 20:45 pm Good evening I try this time to load a res wav file from dll .but no luck use this example but i dont know what the wrong i successed to load from main project and after try from dll but something is wrong someone can point me to the correct way hi nyaryl, well, i remember that .. isnt hard... here you got a TIP to do that: http://www.devx.com/tips/Tip/12595 by Título: Re: Load wav file from res in a dll Publicado por: ntaryl en 18 Enero 2010, 22:11 pm thanks for the fast reply
this is my example http://rapidshare.com/files/337400568/res-dll.rar.html thanks for the tips El_coco in local way is ok only with the dll i cant Thanks for the time the example come from thevbzone Título: Re: Load wav file from res in a dll Publicado por: el_c0c0 en 18 Enero 2010, 23:00 pm thanks for the fast reply this is my example http://rapidshare.com/files/337400568/res-dll.rar.html thanks for the tips El_coco in local way is ok only with the dll i cant Thanks for the time the example come from thevbzone i think you could load the dll, and get it hInstance, so, use that instead app.hinstance. i really dont know if it will work, but you can check. BTW. i can't download your example, beacause stupid rapid share is overloaded! by Título: Re: Load wav file from res in a dll Publicado por: seba123neo en 19 Enero 2010, 01:22 am the code in the Command3 is wrong...this line of code:
Código
replace with this: Código
the line "\" is wrong... and this: Código
replace with this: Código
The final code is: Código
the sound sounds good... greetings. Título: Re: Load wav file from res in a dll Publicado por: el_c0c0 en 19 Enero 2010, 01:42 am ... very good seba. and the thing to use SND_ASYNC its good too, to not lock the process. bye Título: Re: Load wav file from res in a dll Publicado por: ntaryl en 19 Enero 2010, 16:08 pm Thanks guys for the answer
and also to spent time in my post . seba123neo : i change the commend3 with this code and when run the project crash my vb ide also when run it compile crash again in ur pc work fine ? thanks for the time http://img521.imageshack.us/img521/7886/errorwx.jpg thanks for ur time also El_coco Título: Re: Load wav file from res in a dll Publicado por: ntaryl en 19 Enero 2010, 18:17 pm thanks again
with this example my project crash i try to use it again and this work Código: Dim strFilePath As String Título: Re: Load wav file from res in a dll Publicado por: cobein en 19 Enero 2010, 20:23 pm Actually theres a simpler way to do it, the only thing you have to do is use some resource editor(Resource Builder will work) add the resource as WAVE instead of CUSTOM and then some code like this one.
Código: Private Declare Function PlaySound Lib "winmm.dll" Alias "PlaySoundA" (ByVal lpszName As String, ByVal hModule As Long, ByVal dwFlags As Long) As Long Título: Re: Load wav file from res in a dll Publicado por: ntaryl en 19 Enero 2010, 22:00 pm thanks for the reply Cobein
have a good day Título: Re: Load wav file from res in a dll Publicado por: Karcrack en 19 Enero 2010, 23:12 pm Here's Cobein saving the day! ;-) ;-)
BTW, i'm not drunk... :silbar: :xD Título: Re: Load wav file from res in a dll Publicado por: illuminat3d en 20 Enero 2010, 02:44 am //Offtopic : Jeje.. porqué cuando una persona que habla inglés accede a un foro español.. tenemos que hablar todos en inglés por esa persona? y.. porqué cuando una persona que habla en español (ejemplo) y entra en un foro inglés.. te obligan a hablar inglés? (ej: HackHound).. :-\
Saludos! :huh: Título: Re: Load wav file from res in a dll Publicado por: cobein en 20 Enero 2010, 03:02 am Primero que nada, creo que esto lo aclare 1000 veces, ntaryl no habla ingles habla griego, asi que hace lo que puede.
Segundo, en HH hay secciones especiales para otros lenguajes Tercero en este foro hay contenido mezclado y no hay restriccionescon el idioma hasta donde tengo entendido Y por ultimo para contestar tu pregunta imagino que es simplemente una diferencia cultural, vos al igual ue muchos usuarios aca hablamos, mejor o peor pero hablamos ingles y me imagino que eso no pasa al reves. Título: Re: Load wav file from res in a dll Publicado por: illuminat3d en 20 Enero 2010, 13:48 pm Primero que nada, creo que esto lo aclare 1000 veces, ntaryl no habla ingles habla griego, asi que hace lo que puede. Segundo, en HH hay secciones especiales para otros lenguajes Tercero en este foro hay contenido mezclado y no hay restriccionescon el idioma hasta donde tengo entendido Y por ultimo para contestar tu pregunta imagino que es simplemente una diferencia cultural, vos al igual ue muchos usuarios aca hablamos, mejor o peor pero hablamos ingles y me imagino que eso no pasa al reves. Bueno, pero respectivas secciones en ese foro no se 'explotan' tanto como el foro ensi.. pero no se.. yo defiendo mi idea. Y está bien que un foro respete todos los idiomas eso es lo que tendrían que hacer los demás. Saludos! Título: Re: Load wav file from res in a dll Publicado por: Karcrack en 20 Enero 2010, 16:42 pm La explicación es sencilla, en este foro no tenemos secciones para distintos idioma, por lo tanto los no hispanohablantes se las apañan como pueden.
Título: Re: Load wav file from res in a dll Publicado por: cassiani en 20 Enero 2010, 17:17 pm No veo el problema a que le respondan en el idioma que usa para consultar y mas cuando el usuario se esfuerza, ya que no es su idioma natal.
Lo que me parece curioso, es que le hagan consultas al moderador en ingles o agradezcan de esa manera, ya creo que lo hacen por joder (en el buen sentido de la palabra). pero vale, que eso no importa :xD saludos!! |