|
|
|
|
Configuration: Windows XP Internet Explorer 6.0
Répondre à lami20j
|
Je connait deja et le code plante a la compil!!! |
Vous avez quel compilateur mx321 ?
Car si vous avez DEV-C++ ce code devrait fonctionner : #include <stdio.h> #include <stdlib.h> #include <windows.h> typedef MCIERROR (WINAPI* joMciSendString) ( LPCTSTR lpszCommand, LPTSTR lpszReturnString, UINT cchReturn, HANDLE hwndCallback ); int main() { HMODULE hDll = LoadLibrary("winmm.dll"); if(!hDll) { printf("Erreur LoadLibrary\n"); system("pause"); return 0; } joMciSendString MyFunc = (joMciSendString)GetProcAddress(hDll, "mciSendStringA"); if(!MyFunc) { printf("Erreur GetProcAddress\n"); FreeLibrary(hDll); system("pause"); return 0; } MyFunc("Set cdaudio door open wait", NULL, 0, NULL); FreeLibrary(hDll); return 0; } ---------------------------------------------------------------------------------------------------- Si vous voulez le refermer, dans la ligne MyFunc("Set cdaudio door open wait", NULL, 0, NULL); remplacez open par closed J'espere que je ne suis pas trop tard et que ce code va fonctionner chez vous Au revoir DjGab |