PDA

View Full Version : Build with VC++.NET



Junji
February 24, 2005, 07:17:59
How to create the MontiVision Integration ActiveX Control with the VC++ .NET?

CMVIntegrationControl m_mvControl;
...
if(m_mvControl.create(...)==FLASE){
//error handling
}
...

..then I got error..

Or, now we can't build but with VC6or7?

Boregard
February 25, 2005, 16:37:29
If you are running C++ BufferAccessSample and getting error RPC_E_Changed_Mode in the trace output and are running VC++ 7.0 or 7.1,

then this might help: add this test to BufferAccessSample.CPP
"& __WIN32_WINNT !-0x0501" as you see below. This worked for me.

BOOL CBufferAccessSampleApp::InitATL()
{
m_bATLInited = TRUE;
//#if _WIN32_WINNT >= 0x0400 // old line

#if _WIN32_WINNT >= 0x0400 & _WIN32_WINNT != 0x00501
HRESULT hRes = CoInitializeEx(NULL, COINIT_MULTITHREADED);
#else
HRESULT hRes = CoInitialize(NULL);
#endif

if (FAILED(hRes))
{
m_bATLInited = FALSE;
return FALSE;
}

Junji
February 28, 2005, 02:09:10
It works.Thats a great help.Thanks!