Click here to Skip to main content
15,889,116 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: int, read from text file Pin
jonavon blakly27-Feb-05 5:28
jonavon blakly27-Feb-05 5:28 
GeneralRe: int, read from text file (Try this 1) Pin
Alton Williams27-Feb-05 23:39
Alton Williams27-Feb-05 23:39 
Generalcode doesn't work when compiled in debug mode Pin
lino_i26-Feb-05 12:51
lino_i26-Feb-05 12:51 
GeneralRe: code doesn't work when compiled in debug mode Pin
Rob Manderson26-Feb-05 13:21
protectorRob Manderson26-Feb-05 13:21 
GeneralRe: code doesn't work when compiled in debug mode Pin
lino_i26-Feb-05 14:18
lino_i26-Feb-05 14:18 
GeneralRe: code doesn't work when compiled in debug mode Pin
Jibesh27-Feb-05 4:51
professionalJibesh27-Feb-05 4:51 
GeneralRe: code doesn't work when compiled in debug mode Pin
lino_i27-Feb-05 5:38
lino_i27-Feb-05 5:38 
Generalvoid* to Address Conversion Pin
Daklan26-Feb-05 12:22
Daklan26-Feb-05 12:22 
Hi, I've been creating, a semi-portable thread class.

all of it works fine, but i'm having trouble,
understanding how to pass the address of my structure,
through the void* of beginthreadex, and if then how to,
access the structure again from there.

here's a little code to help better explain my problem:


typedef struct {

char* szReference;
__w64 unsigned uHwnd;

unsigned uReferenceLength,
uIdentity,
uState;

} Thread_barrer;

void CCThread::SetFunction(unsigned(__stdcall *uFunction)(void*))
{
this->vfThreadProc = uFunction;
}

void CCThread::InitThread(Thread_barrer &tbObj)
{
tbObj.uHwnd = _beginthreadex(
0,0,vfThreadProc,(void*)&tbObj,
0,&tbObj.uIdentity);

}

but to pass the address of the context (&tbObj <above>) through void*
and access it inside:

unsigned __stdcall ThreadCentre(void *vArguments)
{
Thread_barrer tbObj;

printf("predicted address of tbObj: %d\n",vArguments);
return (1);
}

i'd assume that you could set another context to that address,
but it's not easy to find viable info , on such unique tasks.

note: this all compiles fine, I'm having trouble with using the address,
passed through __beginthreadex to access the context there of.

any tips, or ideals will help.

thank you.

A world without knowledge, is a world without life.
GeneralRe: void* to Address Conversion Pin
Michael Dunn26-Feb-05 12:37
sitebuilderMichael Dunn26-Feb-05 12:37 
GeneralRe: void* to Address Conversion Pin
Daklan26-Feb-05 12:48
Daklan26-Feb-05 12:48 
Generalc++ basic class Pin
bigbadnewill26-Feb-05 11:44
bigbadnewill26-Feb-05 11:44 
GeneralRe: c++ basic class Pin
Daklan26-Feb-05 12:34
Daklan26-Feb-05 12:34 
GeneralRe: c++ basic class Pin
Anonymous27-Feb-05 10:20
Anonymous27-Feb-05 10:20 
GeneralChanging colours of a combo box Pin
Alton Williams26-Feb-05 10:08
Alton Williams26-Feb-05 10:08 
QuestionHow to set up dynamic context menus in MS Word Pin
Sabuncu26-Feb-05 7:12
Sabuncu26-Feb-05 7:12 
GeneralCrashes in international version Pin
JWood26-Feb-05 6:21
JWood26-Feb-05 6:21 
GeneralRe: Crashes in international version Pin
Michael Dunn26-Feb-05 6:51
sitebuilderMichael Dunn26-Feb-05 6:51 
GeneralRe: Crashes in international version Pin
JWood26-Feb-05 8:14
JWood26-Feb-05 8:14 
GeneralRe: Crashes in international version Pin
Michael Dunn26-Feb-05 9:23
sitebuilderMichael Dunn26-Feb-05 9:23 
GeneralRe: Crashes in international version Pin
JWood27-Feb-05 9:34
JWood27-Feb-05 9:34 
GeneralMinidumps! Pin
jhwurmbach27-Feb-05 1:08
jhwurmbach27-Feb-05 1:08 
GeneralRe: Minidumps! Pin
JWood27-Feb-05 9:32
JWood27-Feb-05 9:32 
GeneralRe: Minidumps! Pin
jhwurmbach27-Feb-05 21:04
jhwurmbach27-Feb-05 21:04 
GeneralTab Cntrl String issue Pin
realloc26-Feb-05 4:46
realloc26-Feb-05 4:46 
GeneralRe: Tab Cntrl String issue Pin
Ravi Bhavnani26-Feb-05 5:20
professionalRavi Bhavnani26-Feb-05 5:20 

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.