Click here to Skip to main content
15,896,727 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
GeneralRe: C++ ATL Server project Pin
Steve S6-Aug-03 5:43
Steve S6-Aug-03 5:43 
GeneralRe: C++ ATL Server project Pin
Nemanja Trifunovic6-Aug-03 6:13
Nemanja Trifunovic6-Aug-03 6:13 
GeneralRe: C++ ATL Server project Pin
devvvy6-Aug-03 14:56
devvvy6-Aug-03 14:56 
GeneralRe: C++ ATL Server project Pin
nativespirits30-Dec-03 10:04
nativespirits30-Dec-03 10:04 
GeneralSTL, "upgrade" from sprintf to ostream in a logclass Pin
justin2235-Aug-03 21:01
justin2235-Aug-03 21:01 
GeneralRe: STL, "upgrade" from sprintf to ostream in a logclass Pin
Anonymous5-Aug-03 21:25
Anonymous5-Aug-03 21:25 
GeneralRe: STL, "upgrade" from sprintf to ostream in a logclass Pin
justin2235-Aug-03 21:32
justin2235-Aug-03 21:32 
GeneralATL and ADO Problem Pin
Popeye Doyle Murray5-Aug-03 2:39
Popeye Doyle Murray5-Aug-03 2:39 
I am writing an ATL component to do some data access using ATO. I want to pass a _RecordsetPtr pointer or a _ConnectionPtr to a ATL function. I use code like this:

<br />
<br />
STDMETHODIMP CMyAtlObject::ReadData(LPDISPATCH pAdoRecordset, BOOL *pbSuccess)<br />
{<br />
      _RecordsetPtr pRecordsetPtr;<br />
<br />
  if (FAILED(pAdoRecordset->QueryInterface(IID_IDispatch, (void**) &pRecordsetPtr)))<br />
	{<br />
		return S_FALSE;<br />
	}<br />
<br />
<br />
       // do somethign here with the recordset<br />
<br />
<br />
	return S_OK;<br />
}<br />
<br />


But this doesn't work. The recordset pointer gets closed during the function call. If I pass an _ConnectionPtr as LPDISPATCH, the pointer becomes invalid.

So how can I pass valid ADO _RecordsetPtr's and _ConnectionPtr's to an ATL Object?
GeneralRe: ATL and ADO Problem Pin
Steve S5-Aug-03 23:17
Steve S5-Aug-03 23:17 
GeneralRe: ATL and ADO Problem Pin
Popeye Doyle Murray6-Aug-03 2:27
Popeye Doyle Murray6-Aug-03 2:27 
GeneralRe: ATL and ADO Problem Pin
Steve S6-Aug-03 5:39
Steve S6-Aug-03 5:39 
GeneralWindows Installer MSI file problem Pin
darseh5-Aug-03 0:03
darseh5-Aug-03 0:03 
GeneralIPropertySheet Pin
Subbu Viji4-Aug-03 5:18
Subbu Viji4-Aug-03 5:18 
GeneralATL ActiveX composite control Pin
Subbu Viji4-Aug-03 5:15
Subbu Viji4-Aug-03 5:15 
GeneralI need a good ATL book; Common Controls and Active X Pin
Stormwind3-Aug-03 21:44
Stormwind3-Aug-03 21:44 
GeneralRe: I need a good ATL book; Common Controls and Active X Pin
valikac4-Aug-03 9:30
valikac4-Aug-03 9:30 
GeneralRe: I need a good ATL book; Common Controls and Active X Pin
Stormwind4-Aug-03 15:43
Stormwind4-Aug-03 15:43 
GeneralConverting ATL example from vs7 to vc++6 Pin
paully3-Aug-03 5:26
paully3-Aug-03 5:26 
GeneralATL Registration in win98 Pin
zxb888888881-Aug-03 23:53
zxb888888881-Aug-03 23:53 
GeneralRe: ATL Registration in win98 Pin
Andrew Walker2-Aug-03 12:12
Andrew Walker2-Aug-03 12:12 
GeneralRe: ATL Registration in win98 Pin
zxb888888882-Aug-03 14:28
zxb888888882-Aug-03 14:28 
GeneralATL - invoke an event in a diffrent thread Pin
Arik Poznanski1-Aug-03 6:08
Arik Poznanski1-Aug-03 6:08 
GeneralRe: ATL - invoke an event in a diffrent thread Pin
geo_m12-Aug-03 3:15
geo_m12-Aug-03 3:15 
GeneralRe: ATL - invoke an event in a diffrent thread Pin
Arik Poznanski12-Aug-03 9:10
Arik Poznanski12-Aug-03 9:10 
GeneralRe: ATL - invoke an event in a diffrent thread Pin
geo_m12-Aug-03 12:01
geo_m12-Aug-03 12:01 

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.