Problem calling API functions directly
Posted on 1997-10-31
I am designing a user interface for Win 95 using Microsoft Visual C++ 5.0. I have not been able to directly call an API function. I have had no problem accessing them through the MFC library classes though. For example, I used the CFileDialog class to implement a file open dialog box but when I tried calling the API function, GetOpenFileName() directly nothing happens during execution. No compile or link error during build. When I run the debugger and try to step into GetOpenFileName(), it was skipped over without even hitting the first internal line of code. A call to GetOpenFileName() was in the assembly code when I checked. Now, I need a simple audible ‘beep’ for my interface and I want to directly call another API function, Beep(). I haven’t found a MFC library class that encompasses Beep() so I am trying to call the API function directly. Any ideas why I am having problems calling API functions directly?