Click here to Skip to main content
15,908,455 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
GeneralRe: Add/Remove items in a listBox Pin
rover_boy1-Feb-08 3:57
rover_boy1-Feb-08 3:57 
GeneralRe: Add/Remove items in a listBox Pin
led mike1-Feb-08 4:19
led mike1-Feb-08 4:19 
GeneralRe: Add/Remove items in a listBox Pin
newkid1-Feb-08 4:42
newkid1-Feb-08 4:42 
QuestionHow to wrap MFC control in C++/CLI Pin
BinName30-Jan-08 19:06
BinName30-Jan-08 19:06 
AnswerRe: How to wrap MFC control in C++/CLI Pin
led mike31-Jan-08 4:47
led mike31-Jan-08 4:47 
AnswerRe: How to wrap MFC control in C++/CLI Pin
Zeinpresiyo11-Feb-08 3:18
Zeinpresiyo11-Feb-08 3:18 
QuestionNeed help with twisted callback issue Pin
MissingLinkError30-Jan-08 13:13
MissingLinkError30-Jan-08 13:13 
GeneralRe: Need help with twisted callback issue [modified] Pin
Luc Pattyn30-Jan-08 15:14
sitebuilderLuc Pattyn30-Jan-08 15:14 
Hi,

I did not study your code in detail, but I remember from earlier work the most probable
cause for a "works one time then bombs" situation is a mismatch in the calling conventions
(stdcall, CDecl, that kind of stuff). When calling from managed to unmanaged, you
can choose on both sides and of course you must choose the same on both sides; when
calling from unmanaged to managed, the managed side is fixed, and you must add the
right keywords to make the unmanaged side match the managed side.
Don't trust the defaults, look it up and use the correct calling convention explicitly.


[ADDED]
Another thing to keep in mind is the different sizes of some primitive data types;
among the most confusing are long (32bit unmanaged, 64bit managed) and char (8bit unmanaged,
16bit managed).

Also, if Win64 is relevant, make sure to pass all handles (as well as lParam and wParam)
as IntPtr, which takes either 32-bit or 64-bit depending on the platform.
[/ADDED]

Smile | :)

Luc Pattyn [Forum Guidelines] [My Articles]

This month's tips:
- before you ask a question here, search CodeProject, then Google;
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get;
- use PRE tags to preserve formatting when showing multi-line code snippets.


modified on Wednesday, January 30, 2008 9:58:01 PM

GeneralRe: Need help with twisted callback issue Pin
MissingLinkError1-Feb-08 9:29
MissingLinkError1-Feb-08 9:29 
GeneralInterop problem Pin
teejayem30-Jan-08 5:37
teejayem30-Jan-08 5:37 
GeneralRe: Interop problem Pin
led mike30-Jan-08 5:43
led mike30-Jan-08 5:43 
GeneralRe: Interop problem Pin
teejayem30-Jan-08 6:58
teejayem30-Jan-08 6:58 
GeneralRe: Interop problem Pin
led mike30-Jan-08 7:44
led mike30-Jan-08 7:44 
GeneralRe: Interop problem Pin
teejayem30-Jan-08 8:03
teejayem30-Jan-08 8:03 
QuestionProperties: How Do You Declare/Observe in VS2008? Pin
W Balboos, GHB29-Jan-08 4:49
W Balboos, GHB29-Jan-08 4:49 
AnswerRe: Properties: How Do You Declare/Observe in VS2008? Pin
W Balboos, GHB29-Jan-08 5:30
W Balboos, GHB29-Jan-08 5:30 
GeneralRe: Properties: How Do You Declare/Observe in VS2008? Pin
Scott Dorman29-Jan-08 8:27
professionalScott Dorman29-Jan-08 8:27 
GeneralRe: Properties: How Do You Declare/Observe in VS2008? Pin
W Balboos, GHB31-Jan-08 3:06
W Balboos, GHB31-Jan-08 3:06 
GeneralRe: Properties: How Do You Declare/Observe in VS2008? Pin
Scott Dorman31-Jan-08 3:32
professionalScott Dorman31-Jan-08 3:32 
GeneralRe: Properties: How Do You Declare/Observe in VS2008? Pin
W Balboos, GHB1-Feb-08 1:16
W Balboos, GHB1-Feb-08 1:16 
QuestionXMLWriter over internet Pin
dSolariuM28-Jan-08 21:15
dSolariuM28-Jan-08 21:15 
GeneralRe: XMLWriter over internet Pin
led mike29-Jan-08 4:59
led mike29-Jan-08 4:59 
QuestionHow to use mutual access to public data in parent and mdi child Pin
Chesnokov Yuriy28-Jan-08 21:10
professionalChesnokov Yuriy28-Jan-08 21:10 
GeneralRe: How to use mutual access to public data in parent and mdi child Pin
led mike29-Jan-08 4:51
led mike29-Jan-08 4:51 
Question0xc0150002 error Pin
Arsalan Malik28-Jan-08 4:57
Arsalan Malik28-Jan-08 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.