Click here to Skip to main content
15,885,768 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: CFile::Remove fails Pin
Luc Pattyn20-May-10 9:18
sitebuilderLuc Pattyn20-May-10 9:18 
GeneralRe: CFile::Remove fails Pin
Mike Osbahr25-May-10 4:54
Mike Osbahr25-May-10 4:54 
QuestionIn-place "conversion" of a string literal into a named object Pin
Code-o-mat20-May-10 4:07
Code-o-mat20-May-10 4:07 
QuestionRe: In-place "conversion" of a string literal into a named object Pin
CPallini20-May-10 11:41
mveCPallini20-May-10 11:41 
AnswerRe: In-place "conversion" of a string literal into a named object Pin
Stephen Hewitt20-May-10 14:13
Stephen Hewitt20-May-10 14:13 
AnswerRe: In-place "conversion" of a string literal into a named object Pin
Code-o-mat20-May-10 21:56
Code-o-mat20-May-10 21:56 
QuestionCalling a function directly via VTable. Pin
Green Fuze20-May-10 3:32
Green Fuze20-May-10 3:32 
AnswerRe: Calling a function directly via VTable. Pin
Aescleal20-May-10 3:45
Aescleal20-May-10 3:45 
I probably shouldn't encourage this sort of low level hackery, it'll only hurt someone you work with one day...

However, why what you're up to won't work is due to the "this" pointer. All C++ member function calls have an implied first parameter which is the address of the object the function is invoked on. So if you write:

a->b( c );

the compiler converts this to:

<class of="" a="">::b( &a, c );

So in your case if you call:

p( &comobj, bstr );

it might all start working swimmingly.

Oh, and if it does don't tell anyone I told you or generations of coders will be cursing my name for spreading low level hacks around.

Cheers,

Ash
GeneralRe: Calling a function directly via VTable. Pin
Chris Meech20-May-10 4:19
Chris Meech20-May-10 4:19 
GeneralRe: Calling a function directly via VTable. Pin
Green Fuze20-May-10 6:09
Green Fuze20-May-10 6:09 
GeneralRe: Calling a function directly via VTable. Pin
Aescleal20-May-10 12:32
Aescleal20-May-10 12:32 
QuestionCreate a custom Setup tool to instal other setup programs. (hooking involved.) Pin
Natural_Demon20-May-10 3:24
Natural_Demon20-May-10 3:24 
QuestionCListCtrl Pin
Sakhalean20-May-10 2:52
Sakhalean20-May-10 2:52 
AnswerRe: CListCtrl Pin
CPallini20-May-10 3:02
mveCPallini20-May-10 3:02 
GeneralRe: CListCtrl Pin
Sakhalean20-May-10 3:38
Sakhalean20-May-10 3:38 
GeneralRe: CListCtrl Pin
josda100020-May-10 9:29
josda100020-May-10 9:29 
GeneralRe: CListCtrl Pin
Sakhalean21-May-10 2:41
Sakhalean21-May-10 2:41 
GeneralRe: CListCtrl Pin
josda100021-May-10 3:36
josda100021-May-10 3:36 
GeneralRe: CListCtrl Pin
josda100021-May-10 3:41
josda100021-May-10 3:41 
AnswerRe: CListCtrl Pin
David Crow20-May-10 9:54
David Crow20-May-10 9:54 
GeneralRe: CListCtrl Pin
josda100020-May-10 10:09
josda100020-May-10 10:09 
GeneralRe: CListCtrl Pin
David Crow20-May-10 10:27
David Crow20-May-10 10:27 
GeneralRe: CListCtrl Pin
josda100020-May-10 10:37
josda100020-May-10 10:37 
QuestionLinker Error Pin
john563220-May-10 2:20
john563220-May-10 2:20 
QuestionRe: Linker Error Pin
Chris Meech20-May-10 2:43
Chris Meech20-May-10 2:43 

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.