Click here to Skip to main content
15,886,362 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Query For CFileDialog? Pin
GAJERA3-Nov-10 21:35
GAJERA3-Nov-10 21:35 
QuestionRe: Query For CFileDialog? [modified] Pin
David Crow4-Nov-10 2:58
David Crow4-Nov-10 2:58 
AnswerRe: Query For CFileDialog? Pin
Alain Rist4-Nov-10 3:56
Alain Rist4-Nov-10 3:56 
QuestionError "string data,right truncated" generate when trying to Update by CRecordset? Pin
Le@rner3-Nov-10 18:57
Le@rner3-Nov-10 18:57 
AnswerRe: Error "string data,right truncated" generate when trying to Update by CRecordset? Pin
Stephen Hewitt3-Nov-10 19:33
Stephen Hewitt3-Nov-10 19:33 
GeneralRe: Error "string data,right truncated" generate when trying to Update by CRecordset? Pin
Le@rner3-Nov-10 19:34
Le@rner3-Nov-10 19:34 
AnswerRe: Error "string data,right truncated" generate when trying to Update by CRecordset? Pin
David Crow4-Nov-10 3:01
David Crow4-Nov-10 3:01 
QuestionInterlockedCompareExchange/cmpxchg-lock free queue Pin
Endaroza3-Nov-10 11:53
Endaroza3-Nov-10 11:53 
Hi All!
Probably will go better on the WinAPI section but since there is an ASM part i'm a bit confused of where to put it, and seen that i use gcc...heeelp!! :P
I'm just getting mad, i'm tryng to build a lock-free messaging system with the usage of atomic instructions. And yes i could use boost but i'll lose the interesting part of the whole thing :P
I actually work on windows (hence the Interlock...) with CodeBlocks and the gcc bundled with him on a dual core PC

I instantiated a class with
class ZTest{
public:
   volatile LONG varToCheck;
}

And then i try to something like this (using a member variable of a class created with new)
ZTest *zt=new ZTest();
InterlockCompareExchange(&zt->varToCheck,DEFINE_ONE,DEFINE_TWO);

All the time, while in debug i obtain a segmentation fault... someone said that i should have not used the debug build, i then tryed with the release, removing all optimizations (just to be sure), but after 20/30 iteration over the Interlock... function everything explode...with a segmentation fault..

Reaching the limit of my wrath...i tried with assembly with the LOCK CMPXCHG instruction and... after 20/30 iteration guess what? A segmentation fault Dead | X|

Now, i guess something is totally worng with this, tomorrow i'll try with M$ compiler to check if it's only a gcc fault (i doubt but...)

Does someone ever tryed something like this?
Any suggestion, question and request clarification will be welcome...

Zak...ah, yes i think i'll get soon a segmentation fault myself...
AnswerRe: InterlockedCompareExchange/cmpxchg-lock free queue Pin
Electron Shepherd3-Nov-10 13:52
Electron Shepherd3-Nov-10 13:52 
GeneralRe: InterlockedCompareExchange/cmpxchg-lock free queue [modified] Pin
Endaroza3-Nov-10 22:03
Endaroza3-Nov-10 22:03 
GeneralRe: InterlockedCompareExchange/cmpxchg-lock free queue Pin
federico.strati3-Nov-10 23:47
federico.strati3-Nov-10 23:47 
AnswerSolved !###$@#$ Pin
Endaroza4-Nov-10 0:01
Endaroza4-Nov-10 0:01 
QuestionFind Count Of Bytes Written To An IStream [modified] Pin
Frederick J. Harris3-Nov-10 8:38
Frederick J. Harris3-Nov-10 8:38 
AnswerRe: Find Count Of Bytes Written To An IStream Pin
Electron Shepherd3-Nov-10 11:34
Electron Shepherd3-Nov-10 11:34 
GeneralRe: Find Count Of Bytes Written To An IStream Pin
Frederick J. Harris3-Nov-10 13:45
Frederick J. Harris3-Nov-10 13:45 
AnswerRe: Find Count Of Bytes Written To An IStream Pin
Frederick J. Harris4-Nov-10 4:23
Frederick J. Harris4-Nov-10 4:23 
QuestionHow can use Time Out for any function or thread? Pin
Le@rner3-Nov-10 2:30
Le@rner3-Nov-10 2:30 
AnswerRe: How can use Time Out for any function or thread (URL checker) Pin
Moak3-Nov-10 2:44
Moak3-Nov-10 2:44 
AnswerRe: How can use Time Out for any function or thread? Pin
David Crow3-Nov-10 3:17
David Crow3-Nov-10 3:17 
AnswerRe: How can use Time Out for any function or thread? Pin
yu-jian8-Nov-10 15:21
yu-jian8-Nov-10 15:21 
Questionhow to generate uid for header files Pin
lakshman rao3-Nov-10 2:22
lakshman rao3-Nov-10 2:22 
AnswerRe: how to generate uid for header files Pin
Cedric Moonen3-Nov-10 2:29
Cedric Moonen3-Nov-10 2:29 
AnswerRe: how to generate uid for header files PinPopular
CPallini3-Nov-10 2:50
mveCPallini3-Nov-10 2:50 
AnswerRe: how to generate uid for header files Pin
«_Superman_»3-Nov-10 6:17
professional«_Superman_»3-Nov-10 6:17 
GeneralRe: how to generate uid for header files Pin
lakshman rao8-Nov-10 2:56
lakshman rao8-Nov-10 2:56 

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.