Click here to Skip to main content
14,774,743 members
Home » Discussions » Managed C++/CLI
   

Managed C++/CLI

 
Questionaccess functions in a DLL created in C # for borland c + + builder Pin
Willian Mathias9-Apr-14 9:03
MemberWillian Mathias9-Apr-14 9:03 
AnswerRe: access functions in a DLL created in C # for borland c + + builder Pin
Richard Andrew x6417-Apr-14 9:59
professionalRichard Andrew x6417-Apr-14 9:59 
Questionretrieve words in a HTML page Pin
neterfari2-Apr-14 0:42
Memberneterfari2-Apr-14 0:42 
SuggestionRe: retrieve words in a HTML page Pin
Richard MacCutchan2-Apr-14 1:22
mveRichard MacCutchan2-Apr-14 1:22 
GeneralRe: retrieve words in a HTML page Pin
neterfari2-Apr-14 3:45
Memberneterfari2-Apr-14 3:45 
GeneralRe: retrieve words in a HTML page Pin
Richard MacCutchan2-Apr-14 4:02
mveRichard MacCutchan2-Apr-14 4:02 
GeneralRe: retrieve words in a HTML page Pin
neterfari2-Apr-14 4:26
Memberneterfari2-Apr-14 4:26 
QuestionMultimedia Timer Problem in MFC VS2010 Pin
lephanhung30-Mar-14 19:44
Memberlephanhung30-Mar-14 19:44 
I want to use a mm_timer for my application by 60Hz or less Big Grin | :-D . This is my testing code.

- In "testmmtimerDlg.h" header file:

#include "mmsystem.h"
#pragma once
#pragma comment(lib, "winmm.lib")

public:
	double m_dcount;
	static void CALLBACK TimeProc(UINT wTimerID, UINT msg, DWORD dwUser, DWORD dw1, DWORD dw2);

	void MMTimerHandler(UINT nIDEvent);
	void StopTimer();
		
	MMRESULT m_Timer;	
	DWORD resolution;</pre>

- In "testmmtimerDlg.cpp" file:

<pre>void CtestmmtimerDlg::OnBnClickedTest()
{
	// TODO: Add your control notification handler code here
	m_dcount = 0;
	// Set resolution to the minimum supported by the system
	
	TIMECAPS tc;
	timeGetDevCaps(&tc, sizeof(TIMECAPS));
	resolution = min(max(tc.wPeriodMin, 0), tc.wPeriodMax);
	timeBeginPeriod(resolution);
	
	// create the timer
	m_Timer = timeSetEvent(10,resolution,TimeProc,(DWORD)this,TIME_PERIODIC);
}

void CALLBACK TimeProc(UINT wTimerID, UINT msg, DWORD dwUser, DWORD dw1, DWORD dw2)
{
	// This is used only to call MMTimerHandler

	// Typically, this function is static member of CTimersDlg

	CtestmmtimerDlg* obj = (CtestmmtimerDlg*) dwUser;
	obj->MMTimerHandler(wTimerID);
}

void CtestmmtimerDlg::StopTimer()
{
    // destroy the timer
    timeKillEvent(m_Timer);

    // reset the timer
    timeEndPeriod (resolution);
}


==>> But when I try to debug, I have 2 problem:
- First, "
testmmtimerDlg.obj : error LNK2019: unresolved external symbol "public: static void __stdcall CtestmmtimerDlg::TimeProc(unsigned int,unsigned int,unsigned long,unsigned long,unsigned long)" (?TimeProc@CtestmmtimerDlg@@SGXIIKKK@Z) referenced in function "public: void __thiscall CtestmmtimerDlg::OnBnClickedTest(void)" (?OnBnClickedTest@CtestmmtimerDlg@@QAEXXZ)
1>C:\Users\HungReo\Documents\Visual Studio 2010\Projects\testmmtimer\Debug\testmmtimer.exe : fatal error LNK1120: 1 unresolved externals

"

- Second, in header file, I try to change:
void (CALLBACK *TimeProc)(UINT wTimerID, UINT msg, DWORD dwUser, DWORD dw1, DWORD dw2);

==>>>> OxC0000005: Access Violoation

- May someone help me to solve these problem???

modified 31-Mar-14 0:54am.

AnswerRe: Multimedia Timer Problem in MFC VS2010 Pin
Richard MacCutchan30-Mar-14 22:52
mveRichard MacCutchan30-Mar-14 22:52 
GeneralRe: Multimedia Timer Problem in MFC VS2010 Pin
lephanhung31-Mar-14 3:11
Memberlephanhung31-Mar-14 3:11 
GeneralRe: Multimedia Timer Problem in MFC VS2010 Pin
lephanhung31-Mar-14 20:24
Memberlephanhung31-Mar-14 20:24 
QuestionCompiler Bug in C++/CLI vs Native C++ Pin
John Schroedl28-Mar-14 2:51
professionalJohn Schroedl28-Mar-14 2:51 
QuestionRun exe resource from memory. Pin
Member 1055963526-Mar-14 2:23
MemberMember 1055963526-Mar-14 2:23 
AnswerRe: Run exe resource from memory. Pin
Richard Andrew x6426-Mar-14 6:41
professionalRichard Andrew x6426-Mar-14 6:41 
Newscursor problem Pin
neterfari26-Mar-14 2:10
Memberneterfari26-Mar-14 2:10 
GeneralRe: cursor problem Pin
Richard MacCutchan26-Mar-14 2:38
mveRichard MacCutchan26-Mar-14 2:38 
GeneralRe: cursor problem Pin
neterfari26-Mar-14 4:17
Memberneterfari26-Mar-14 4:17 
GeneralRe: cursor problem Pin
neterfari26-Mar-14 4:19
Memberneterfari26-Mar-14 4:19 
GeneralRe: cursor problem Pin
John Schroedl26-Mar-14 6:06
professionalJohn Schroedl26-Mar-14 6:06 
GeneralRe: cursor problem Pin
Richard MacCutchan26-Mar-14 6:35
mveRichard MacCutchan26-Mar-14 6:35 
GeneralRe: cursor problem Pin
neterfari26-Mar-14 11:02
Memberneterfari26-Mar-14 11:02 
GeneralRe: cursor problem Pin
Richard MacCutchan26-Mar-14 23:48
mveRichard MacCutchan26-Mar-14 23:48 
GeneralRe: cursor problem Pin
neterfari27-Mar-14 0:08
Memberneterfari27-Mar-14 0:08 
GeneralRe: cursor problem Pin
Richard MacCutchan27-Mar-14 0:18
mveRichard MacCutchan27-Mar-14 0:18 
GeneralRe: cursor problem Pin
neterfari27-Mar-14 1:38
Memberneterfari27-Mar-14 1:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.