From: <ale...@ya...> - 2004-06-16 00:32:46
|
Hello to everyone on the list, can someone please help me to figure out what I'm doing wrong? I have built wiax.dll correctly (thanks Dan). Then I use it this way: typedef int (*IAX_Initialize)(int audType, int nCalls); IAX_Initialize IAXInitialize; HINSTANCE hinstLib = LoadLibrary("wiax"); if (hinstLib == NULL) { AfxMessageBox("wiax.dll not found", MB_OK, 0); return; } IAXInitialize = (IAX_Initialize) GetProcAddress(hinstLib, "IAX_Initialize"); if (IAXInitialize == NULL) AfxMessageBox("IAXInitialize == NULL", MB_OK, 0); else (IAXInitialize)(AUDIO_INTERNAL_PA, 1); This last call to IAXInitialize causes a memory violation and the app ends. I modified the DLL not to call iax_initialize but to print a message with MessageBox and it works fine. Also are there any suggestions about where in the MFC code I should start the IAX initializations. It is just a CDialog. Thanks in advance for any help Alessandro --------------------------------- Yahoo! Companion - Scarica gratis la toolbar di Ricerca di Yahoo! |