Click here to Skip to main content
15,908,015 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralWelcome Pin
prasad_som13-Oct-06 0:57
prasad_som13-Oct-06 0:57 
GeneralRe: Changing the Font of a Dialog Static Label Pin
Mila02512-Oct-06 23:17
Mila02512-Oct-06 23:17 
AnswerRe: Changing the Font of a Dialog Static Label Pin
Hamid_RT13-Oct-06 1:04
Hamid_RT13-Oct-06 1:04 
AnswerRe: Changing the Font of a Dialog Static Label Pin
David Crow13-Oct-06 3:06
David Crow13-Oct-06 3:06 
QuestionCOM Object Pin
LOUIS Christian12-Oct-06 20:44
LOUIS Christian12-Oct-06 20:44 
GeneralRe: COM Object Pin
prasad_som12-Oct-06 21:01
prasad_som12-Oct-06 21:01 
AnswerRe: COM Object Pin
Hamid_RT13-Oct-06 8:15
Hamid_RT13-Oct-06 8:15 
QuestionHow to lock object externally? Pin
kiranin12-Oct-06 20:12
kiranin12-Oct-06 20:12 
Hi,


For some odd reason, I am not able to Register the COleDropTarget.
I have been working with my project for a while, so I suspect it is
something within my project.




I do have the member variable COleDropTarget m_dropTarget in the header.
Then, in the OnInitialUpdate, I call m_dropTarget.Register(this).


// register drop target
BOOL b = m_dropTarget.Register(this);


It keeps failing at the if(CoLockObjectExternal()) shown below.


Does anybody know what CoLockObjectExternal means?


BOOL COleDropTarget::Register(CWnd* pWnd) 
{ 
 ASSERT_VALID(this); 
 ASSERT(m_hWnd == NULL); // registering drop target twice? 
 ASSERT_VALID(pWnd); 


 LPUNKNOWN lpUnknown = (LPUNKNOWN)GetInterface(&IID_IUnknown); 
 ASSERT(lpUnknown != NULL); 


 // the object must be locked externally to keep LRPC connections alive 
 if (CoLockObjectExternal(lpUnknown, TRUE, FALSE) != S_OK) 
  return FALSE; 

QuestionHow to share data in a same dll loaded by different process? Pin
Best Kiluyar12-Oct-06 19:27
Best Kiluyar12-Oct-06 19:27 
AnswerRe: How to share data in a same dll loaded by different process? Pin
Don Fletcher12-Oct-06 21:10
Don Fletcher12-Oct-06 21:10 
AnswerRe: How to share data in a same dll loaded by different process? Pin
Blake Miller13-Oct-06 4:29
Blake Miller13-Oct-06 4:29 
Questionaccess database Pin
With_problem12-Oct-06 18:02
With_problem12-Oct-06 18:02 
AnswerRe: access database Pin
prasad_som12-Oct-06 19:15
prasad_som12-Oct-06 19:15 
AnswerRe: access database Pin
Hamid_RT12-Oct-06 19:47
Hamid_RT12-Oct-06 19:47 
AnswerRe: access database Pin
David Crow13-Oct-06 3:05
David Crow13-Oct-06 3:05 
QuestionBizarre VC++ compiler error Pin
ljr2412-Oct-06 16:24
ljr2412-Oct-06 16:24 
QuestionRe: Bizarre VC++ compiler error Pin
prasad_som12-Oct-06 20:39
prasad_som12-Oct-06 20:39 
QuestionPrinting bitmaps from a frame grabber Pin
Bob Hickey12-Oct-06 16:22
Bob Hickey12-Oct-06 16:22 
AnswerRe: Printing bitmaps from a frame grabber Pin
Hamid_RT12-Oct-06 19:54
Hamid_RT12-Oct-06 19:54 
AnswerRe: Printing bitmaps from a frame grabber Pin
Steve S12-Oct-06 21:40
Steve S12-Oct-06 21:40 
QuestionRe: Printing bitmaps from a frame grabber Pin
Bob Hickey14-Oct-06 16:00
Bob Hickey14-Oct-06 16:00 
QuestionDialog 'hang' after C procedure called. Pin
searcher0812-Oct-06 15:56
searcher0812-Oct-06 15:56 
AnswerRe: Dialog 'hang' after C procedure called. Pin
Christian Graus12-Oct-06 15:58
protectorChristian Graus12-Oct-06 15:58 
GeneralRe: Dialog 'hang' after C procedure called. Pin
XuShanghua12-Oct-06 17:07
XuShanghua12-Oct-06 17:07 
GeneralRe: Dialog 'hang' after C procedure called. Pin
Hamid_RT12-Oct-06 19:51
Hamid_RT12-Oct-06 19:51 

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.