Click here to Skip to main content
15,918,742 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: ANY GURU TO EXPLAIN THIS? Pin
Daniel Visan3-Jul-01 20:51
Daniel Visan3-Jul-01 20:51 
GeneralRe: ANY GURU TO EXPLAIN THIS? Pin
Daniel Visan3-Jul-01 21:58
Daniel Visan3-Jul-01 21:58 
GeneralRe: ANY GURU TO EXPLAIN THIS? Pin
Mike Burston4-Jul-01 20:00
Mike Burston4-Jul-01 20:00 
GeneralRe: ANY GURU TO EXPLAIN THIS? Pin
Daniel Visan4-Jul-01 21:25
Daniel Visan4-Jul-01 21:25 
GeneralRe: ANY GURU TO EXPLAIN THIS? Pin
Mike Burston5-Jul-01 12:42
Mike Burston5-Jul-01 12:42 
AnswerRe: ANY GURU TO EXPLAIN THIS? Pin
4-Jul-01 18:27
suss4-Jul-01 18:27 
GeneralCOleDateTime Pin
3-Jul-01 4:41
suss3-Jul-01 4:41 
GeneralThreadProc and templates Pin
Anders Molin3-Jul-01 2:55
professionalAnders Molin3-Jul-01 2:55 
I have a small problem here, I need to somehow get the parameter from a template, eg <int> passed to a thread function...

I was thinking about something like:
template <typename T>
DWORD WINAPI WorkThread(LPVOID lpParameter);


but the compiler get's mad at me...
"error C2664: 'CreateThread' : cannot convert parameter 3 from 'unsigned long (void *)' to 'unsigned long (__stdcall *)(void *)'"

Is there any way to do this Confused | :confused:

I really need it, because I have a template class which get another class as it's parameter, then starts some threads, where the thread parameter is a pointer to the class passed as the template parameter.
In the thread I need to declare a pointer to that class, and then cast my thread parameter to that...
Does that make any sence???

- Anders

Money talks, but all mine ever says is "Goodbye!"
GeneralRe: ThreadProc and templates Pin
Tomasz Sowinski3-Jul-01 6:04
Tomasz Sowinski3-Jul-01 6:04 
GeneralRe: ThreadProc and templates Pin
Chris Meech3-Jul-01 7:13
Chris Meech3-Jul-01 7:13 
GeneralCrystal Report question ... Pin
Hadi Rezaee3-Jul-01 1:50
Hadi Rezaee3-Jul-01 1:50 
GeneralRe: Crystal Report question ... Pin
l a u r e n3-Jul-01 5:25
l a u r e n3-Jul-01 5:25 
GeneralRe: Crystal Report question ... Pin
Hadi Rezaee3-Jul-01 7:45
Hadi Rezaee3-Jul-01 7:45 
GeneralRe: Crystal Report question ... Pin
Hadi Rezaee3-Jul-01 20:20
Hadi Rezaee3-Jul-01 20:20 
GeneralActive Frame IE Pin
Oguzhan ERKAN3-Jul-01 0:55
Oguzhan ERKAN3-Jul-01 0:55 
GeneralMicrosoft FlexGrid Control Pin
2-Jul-01 23:52
suss2-Jul-01 23:52 
GeneralRe: Microsoft FlexGrid Control Pin
CodeGuy3-Jul-01 7:30
CodeGuy3-Jul-01 7:30 
GeneralRe: Microsoft FlexGrid Control Pin
3-Jul-01 22:08
suss3-Jul-01 22:08 
Questionhow to realize a dialog bar application ,which calls several MDI interfaces Pin
2-Jul-01 23:27
suss2-Jul-01 23:27 
GeneralIE Launch from VC Pin
Yuvarajan JT2-Jul-01 23:19
Yuvarajan JT2-Jul-01 23:19 
GeneralPointer to a function Pin
2-Jul-01 22:37
suss2-Jul-01 22:37 
GeneralRe: Pointer to a function Pin
3-Jul-01 4:57
suss3-Jul-01 4:57 
GeneralRe: Pointer to a function Pin
3-Jul-01 9:50
suss3-Jul-01 9:50 
GeneralPlease help with creating a hidden window Pin
JavaTony2-Jul-01 21:55
JavaTony2-Jul-01 21:55 
GeneralRe: Please help with creating a hidden window Pin
3-Jul-01 4:57
suss3-Jul-01 4:57 

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.