You are declaring TimeProc as a pointer to a function which is totally incorrect.
It should be like:
// in the class definition in the header file:void CALLBACK TimeProc(UINT wTimerID, UINT msg, DWORD dwUser, DWORD dw1, DWORD dw2);
// and the declaration in the .cpp file:void CALLBACK CtestmmtimerDlg::TimeProc(UINT wTimerID, UINT msg, DWORD dwUser, DWORD dw1, DWORD dw2)
// implementation code here
I entered this Connect bug found by a coworker. If you're a C++/CLI dev you may want to upvote it.
The /clr compiler issues an error whereas the C++ compiler (and clang/llvm on Mac) accept the template code. It's a template using std::is_base_of and isn't too crazy. There's no managed code involved at all in fact (ie. no ref classes).
Hi, i am working on a project using C and C++.
But now i have to use lil bit of C# code in it.So i made a sample application , converted all the c# code to managed C++/CLI.I changed the properties of sample app to Clr support.It worked fine.
But in my current project, i have some pure c classes also. So when i was changing the property of my project to CLR , it gave me error of xyz.c file cannot convert into \clr.
I dont know wat to do?i cannot convert xyz.c class into xyz.cpp
Can anyone suggest what should i do... Is it possible that i mange to use mannaged c++ also and i still donot have to convert the whole project into CLR.
Last Visit: 31-Dec-99 19:00 Last Update: 7-Mar-21 18:47