Click here to Skip to main content
16,005,552 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Timer stuff Pin
Christian Graus14-Dec-01 11:28
protectorChristian Graus14-Dec-01 11:28 
GeneralRe: Timer stuff Pin
Rickard Andersson2015-Dec-01 1:10
Rickard Andersson2015-Dec-01 1:10 
GeneralPotentially silly question about CWinThread Pin
nay14-Dec-01 8:45
nay14-Dec-01 8:45 
GeneralRe: Potentially silly question about CWinThread Pin
Alvaro Mendez14-Dec-01 10:52
Alvaro Mendez14-Dec-01 10:52 
GeneralRe: Potentially silly question about CWinThread Pin
nay14-Dec-01 12:09
nay14-Dec-01 12:09 
QuestionWhat am I missing here? Pin
clintsinger14-Dec-01 7:25
clintsinger14-Dec-01 7:25 
AnswerRe: What am I missing here? Pin
Joaquín M López Muñoz14-Dec-01 10:33
Joaquín M López Muñoz14-Dec-01 10:33 
Generalaccessing an ADO recordset pointer from another window Pin
14-Dec-01 7:13
suss14-Dec-01 7:13 
I´m having trouble using "global" ado recordset pointers in a project.
I have a recordset in a +/- fixed window, that I want to used by other windows that are constantly beeing created and destroyed.
I can access the window pointer easily but when i try to access the recordset pointer the program crashes. The weird thing is that i can visualise the pointer in the debug windows correctly. the code is below, what am I dooing wrong?



class CMainFrame : public CFrameWnd{...
public:
_ConnectionPtr pCon;
CWnd *pTrabalhadoresView;
...}

class CDLG_TRABALHADORES_VIEW : public CResizableFormView{...
public:
_RecordsetPtr
pRstTrabalhadoresDados;
...}

void CDLG_TRABALHADORES_VIEW::OnInitialUpdate()
{...
pMain= (CMainFrame *)AfxGetMainWnd();
pRstTrabalhadoresDados.CreateInstance(__uuidof(Recordset));
pRstTrabalhadoresDados->Open("trabalhadoresdados",_variant_t((IDispatch *)pMain->pCon,true),adOpenDynamic,adLockOptimistic,adCmdTableDirect);
...}

void AnotherWindow::OnSomething(){...
CMainFrame* pMain= (CMainFrame *)AfxGetMainWnd();
CDLG_TRABALHADORES_VIEW* pTrabalhadoresView=(CDLG_TRABALHADORES_VIEW*)pMain->pTrabalhadoresView;
_RecordsetPtr pRstTrabalhadoresData=pTrabalhadoresView->pRstTrabalhadoresDados;
/* UNHANDLED EXCEPTION IN TEST.exe: 0xc0000005: Access violation */
...}



Texas
GeneralRe: accessing an ADO recordset pointer from another window Pin
Carlos Antollini14-Dec-01 7:28
Carlos Antollini14-Dec-01 7:28 
QuestionHow to find out unwanted DLL in a System? Pin
14-Dec-01 6:38
suss14-Dec-01 6:38 
AnswerRe: How to find out unwanted DLL in a System? Pin
Alvaro Mendez14-Dec-01 7:16
Alvaro Mendez14-Dec-01 7:16 
GeneralTrying to manipulate CStdioFile Pin
Stevieslu14-Dec-01 6:37
Stevieslu14-Dec-01 6:37 
GeneralRe: Trying to manipulate CStdioFile Pin
Alvaro Mendez14-Dec-01 7:19
Alvaro Mendez14-Dec-01 7:19 
Generalimplementing powerpoint presentation slide show Pin
Kuniva14-Dec-01 5:37
Kuniva14-Dec-01 5:37 
GeneralEmail Pin
SuperGeek14-Dec-01 5:31
SuperGeek14-Dec-01 5:31 
GeneralRe: Email Pin
Andrew Peace15-Dec-01 4:14
Andrew Peace15-Dec-01 4:14 
Generalswitching Media player active-x control to full screen Pin
Kuniva14-Dec-01 5:13
Kuniva14-Dec-01 5:13 
GeneralConverting int to CString Pin
Cam14-Dec-01 4:53
Cam14-Dec-01 4:53 
GeneralRe: Converting int to CString Pin
Joaquín M López Muñoz14-Dec-01 4:59
Joaquín M López Muñoz14-Dec-01 4:59 
GeneralRe: Converting int to CString Pin
Cam14-Dec-01 5:09
Cam14-Dec-01 5:09 
GeneralRe: Converting int to CString Pin
Alvaro Mendez14-Dec-01 5:16
Alvaro Mendez14-Dec-01 5:16 
GeneralRe: Converting int to CString Pin
Cam14-Dec-01 5:48
Cam14-Dec-01 5:48 
QuestionHow to Change the 'Caption' of a CPropertyPage Pin
14-Dec-01 3:39
suss14-Dec-01 3:39 
AnswerRe: How to Change the 'Caption' of a CPropertyPage Pin
Joaquín M López Muñoz14-Dec-01 4:23
Joaquín M López Muñoz14-Dec-01 4:23 
GeneralCreating Excel files Pin
14-Dec-01 2:21
suss14-Dec-01 2:21 

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.