Click here to Skip to main content
15,851,395 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionAssigning pointers from one class to another and Pin
Vaclav_14-Oct-16 7:23
Vaclav_14-Oct-16 7:23 
AnswerRe: Assigning pointers from one class to another and Pin
leon de boer14-Oct-16 18:58
leon de boer14-Oct-16 18:58 
GeneralRe: Assigning pointers from one class to another and Pin
Vaclav_15-Oct-16 3:24
Vaclav_15-Oct-16 3:24 
GeneralRe: Assigning pointers from one class to another and Pin
leon de boer15-Oct-16 5:42
leon de boer15-Oct-16 5:42 
GeneralRe: Assigning pointers from one class to another and Pin
Vaclav_15-Oct-16 7:12
Vaclav_15-Oct-16 7:12 
GeneralRe: Assigning pointers from one class to another and Pin
leon de boer15-Oct-16 18:16
leon de boer15-Oct-16 18:16 
GeneralRe: Assigning pointers from one class to another and Pin
Vaclav_19-Oct-16 5:54
Vaclav_19-Oct-16 5:54 
GeneralRe: Assigning pointers from one class to another and Pin
leon de boer19-Oct-16 8:45
leon de boer19-Oct-16 8:45 
Yes but that is easy to deal with fire the interrupt to a static function then kick it to the object. That solution is trivial.
PSOMECLASS* TheClassObject = NULL;

static void InterruptComesInHere (void){
   if (TheClassObject) {                 // Make sure class/object has been set otherwise interrupt just returns
       TheClassObject->CallSomeMethod(); // Send interrupt into class/object if set
   }
}

All you have to do once you have your object initialized ready to receive is set the pointer to the created object using the & symbol.
I would disable interrupts while you do the pointer set Smile | :)

All it really does is makes the interrupt a couple of cycles slower. The harder part by far is dealing with the interupts in
windows which is nowhere near as easy as DOS.

I assume this is a windows app and I wonder have you got the interrupt working because that isn't easy on windows 7,8 & 10
Windows uses hardware interrupts internally and does not let applications mess with them. You need to create a write a kernel-mode driver for that which is not trivial.

To be honest in Windows at your level it would be easier to simply create a thread and poll the hardware for data and get rid of the interrupt all together.

If you are trying to do this sort of thing commercially you are better off porting the IO onto a USB because they have raw block transfer mechanisms and the USB interface can be bought off the shelf. If you look up EasyCap for example which sells for about $10-$15 will drag normal S video into windows via the USB using exactly that trick.
In vino veritas


modified 19-Oct-16 14:02pm.

NewsHow to provide a Security to a proprietary software or presemtation. Pin
Member 1278313512-Oct-16 21:03
Member 1278313512-Oct-16 21:03 
GeneralRe: How to provide a Security to a proprietary software or presemtation. Pin
jeron113-Oct-16 5:15
jeron113-Oct-16 5:15 
GeneralRe: How to provide a Security to a proprietary software or presemtation. Pin
leon de boer13-Oct-16 9:17
leon de boer13-Oct-16 9:17 
Questionclass is missing "type" - why ? Pin
Vaclav_12-Oct-16 16:00
Vaclav_12-Oct-16 16:00 
AnswerRe: class is missing "type" - why ? Pin
leon de boer12-Oct-16 18:45
leon de boer12-Oct-16 18:45 
AnswerRe: class is missing "type" - why ? Pin
Graham Breach13-Oct-16 0:11
Graham Breach13-Oct-16 0:11 
QuestionObject Creation of an class? Pin
Mathan_CodeProject11-Oct-16 6:17
Mathan_CodeProject11-Oct-16 6:17 
AnsweralternatRe: Object Creation of an class? Pin
leon de boer11-Oct-16 6:50
leon de boer11-Oct-16 6:50 
GeneralRe: alternatRe: Object Creation of an class? Pin
Mathan_CodeProject12-Oct-16 0:02
Mathan_CodeProject12-Oct-16 0:02 
AnswerRe: Object Creation of an class? Pin
Krishnakumartg11-Oct-16 20:46
Krishnakumartg11-Oct-16 20:46 
GeneralRe: Object Creation of an class? Pin
Mathan_CodeProject12-Oct-16 0:01
Mathan_CodeProject12-Oct-16 0:01 
AnswerRe: Object Creation of an class? Pin
Midi_Mick11-Oct-16 23:13
professionalMidi_Mick11-Oct-16 23:13 
GeneralRe: Object Creation of an class? Pin
Mathan_CodeProject12-Oct-16 0:01
Mathan_CodeProject12-Oct-16 0:01 
QuestionC++ syntax Pin
Ratul Thakur10-Oct-16 22:35
Ratul Thakur10-Oct-16 22:35 
AnswerRe: C++ syntax Pin
CPallini10-Oct-16 22:49
mveCPallini10-Oct-16 22:49 
AnswerRe: C++ syntax Pin
Richard MacCutchan10-Oct-16 22:50
mveRichard MacCutchan10-Oct-16 22:50 
AnswerRe: C++ syntax Pin
David Crow11-Oct-16 7:20
David Crow11-Oct-16 7: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.