Click here to Skip to main content
16,012,316 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a standard Windows Form Application compiled witb /clr:pure switches. I am trying to call functions inside WinMM.dll. I beleive that the proper h file is "C:\Program Files (x86)\Microsoft Visual Studio 8\SDK\v2.0\include\MMSystem.h". The h file does exist and can be opened by depends.exe.

The basic program compiles fine until I add support for calling DLL functions.

What I have tried:

I have googled, bing, and yahooed this question (and a score of simlar ones) 'till my eyes glazed over.
I have tried:
#include <mmsystem.h> ------------------- 88 errors

#include <mmsystem> fatal error C1083: Cannot open include file: 'MMSystem': No such file or directory	

#import <mmsystem> error C2812: #import is not supported with /clr:pure and /clr:safe	

#using <C:\Program Files (x86)\Microsoft Visual Studio 8\SDK\v2.0\include\MMSystem.h> error C1192: #using failed on 'C:\Program Files (x86)\Microsoft Visual Studio 8\SDK\v2.0\include\MMSystem.h'
Posted
Updated 17-Feb-17 3:53am

1 solution

Of Course:
As soon as I finished posting this article; after three days of searching, I stumbled upon the answer. Use [DllImport("winmm.dll",...

Sorry for wasting space and thanks to codeproject for just being there even for those of us who are sometimes just DUMB ;}
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900