Click here to Skip to main content
15,905,967 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
GeneralRe: how to create a docable or vertical toolbar based on WTL CToolBarCtrl Pin
rajas6-May-09 6:04
rajas6-May-09 6:04 
GeneralFast search of a vector of strings Pin
bruccutler15-Apr-08 12:40
bruccutler15-Apr-08 12:40 
GeneralRe: Fast search of a vector of strings Pin
Andy Moore16-Apr-08 6:39
Andy Moore16-Apr-08 6:39 
Generalerror MIDL2025 : syntax error Pin
Ganesh_T14-Apr-08 0:53
Ganesh_T14-Apr-08 0:53 
QuestionRe: error MIDL2025 : syntax error Pin
Nathan Holt at EMOM16-Apr-08 10:56
Nathan Holt at EMOM16-Apr-08 10:56 
GeneralCoCreateInstanceAsAdmin Pin
swamy Narasimha13-Apr-08 23:14
swamy Narasimha13-Apr-08 23:14 
GeneralRe: CoCreateInstanceAsAdmin Pin
Jörgen Sigvardsson1-May-08 0:19
Jörgen Sigvardsson1-May-08 0:19 
QuestionVB Client Crashes while using ATL COM build in C++ Pin
garammasala13-Apr-08 22:56
garammasala13-Apr-08 22:56 
hi All,

My VB Client using ATL COM works fine while running under Debug mode but in the release mode it gets crashed as ATL COM tries to fire event to the VB Client

Here are the Details of what i have developed as ATL COM in C+

I have developed a simple ATL COM in C++ , This ATL Com has a dependency which is a DLL , this DLL sends a notification to the ATL COM by using a registering a function of a ATL as callback , i have used a static function of ATL Object as callback function as we cannot give member function of the class as callback function due to "this" pointer.

Now Dll sends notification to this static function of ATL COM and this ATL COM send the notification further to the COM Client by firing event.

Important to note , since notification is received by static function of ATL class , so i had to use global pointer to the ATL COM in that static function to Fire_Event , as soon as global pointer fires events VB client in release mode gets crashed

Here is the code snippet


CTest_ATL *g_pTestATL; // Glboal Pointer

STDMETHODIMP CTest_ATL::funSubscribe(void)
{
g_pTestATL = this;

m_hDLL = LoadLibrary(TEXT("\\DLL_PlaceCall.dll"));

if(NULL == m_hDLL)
{
return S_FALSE;
}

return S_OK;
}


// This is a callback "static" function which gets registered to the DLL
// As this static callback function gets called i am firing event using
// global pointer to ATL_COM as shown below
int CTest_ATL::EventCallBack()
{
g_CallMonitor->Fire_IncomingCall(CComBSTR("This is a COM Message"));
return S_OK;
}

Any pointers in this issue will be a great help.....

with regards
Abhiraj
GeneralRe: VB Client Crashes while using ATL COM build in C++ Pin
Nathan Holt at EMOM16-Apr-08 11:35
Nathan Holt at EMOM16-Apr-08 11:35 
GeneralRe: VB Client Crashes while using ATL COM build in C++ Pin
garammasala21-Apr-08 18:15
garammasala21-Apr-08 18:15 
GeneralRe: VB Client Crashes while using ATL COM build in C++ Pin
Nathan Holt at EMOM22-Apr-08 6:27
Nathan Holt at EMOM22-Apr-08 6:27 
GeneralRe: VB Client Crashes while using ATL COM build in C++ [modified] Pin
garammasala28-Apr-08 2:49
garammasala28-Apr-08 2:49 
GeneralConverting MFC code to WTL [modified] Pin
Rune Andersen11-Apr-08 3:18
Rune Andersen11-Apr-08 3:18 
GeneralDoubt in templates Pin
C.P.Rajesh11-Apr-08 1:57
C.P.Rajesh11-Apr-08 1:57 
GeneralRe: Doubt in templates Pin
Johann Gerell14-May-08 21:34
Johann Gerell14-May-08 21:34 
QuestionHow to use multi byte character set in vs2008 ATL Pin
Robe10-Apr-08 18:16
Robe10-Apr-08 18:16 
AnswerRe: How to use multi byte character set in vs2008 ATL Pin
Nathan Holt at EMOM16-Apr-08 11:41
Nathan Holt at EMOM16-Apr-08 11:41 
GeneralRe: How to use multi byte character set in vs2008 ATL Pin
dlocarnini9-Jun-08 3:57
dlocarnini9-Jun-08 3:57 
Generalconversion from char* to string Pin
gReaen9-Apr-08 3:35
gReaen9-Apr-08 3:35 
GeneralRe: conversion from char* to string Pin
Hamid_RT14-Apr-08 21:49
Hamid_RT14-Apr-08 21:49 
GeneralRe: conversion from char* to string Pin
Johann Gerell14-May-08 21:47
Johann Gerell14-May-08 21:47 
GeneralUsing WTL/ATL in a static library Pin
mateuscb3-Apr-08 3:42
mateuscb3-Apr-08 3:42 
GeneralRe: Using WTL/ATL in a static library Pin
mateuscb3-Apr-08 7:24
mateuscb3-Apr-08 7:24 
QuestionCan u hand over CStrings from MFC to a WTL DLL? [modified] Pin
DaveB229-Mar-08 1:51
DaveB229-Mar-08 1:51 
AnswerRe: Can u hand over CStrings from MFC to a WTL DLL? Pin
Stuart Dootson29-Mar-08 16:25
professionalStuart Dootson29-Mar-08 16:25 

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.