Click here to Skip to main content
15,924,039 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Clearing a CRichTextCtrl? Not in XP... Pin
James R. Twine13-May-02 5:25
James R. Twine13-May-02 5:25 
GeneralCStatusBar: Status Bar refresh problem Pin
9-May-02 9:24
suss9-May-02 9:24 
GeneralOpen with dialog Pin
User 98859-May-02 9:18
User 98859-May-02 9:18 
GeneralRe: Open with dialog Pin
Dan Madden9-May-02 9:15
Dan Madden9-May-02 9:15 
GeneralRe: Open with dialog Pin
Joaquín M López Muñoz9-May-02 9:23
Joaquín M López Muñoz9-May-02 9:23 
GeneralERROR: (COM) when compiling with MIDL... Pin
9-May-02 9:10
suss9-May-02 9:10 
GeneralRe: ERROR: (COM) when compiling with MIDL... Pin
Vivek Rajan10-May-02 10:35
Vivek Rajan10-May-02 10:35 
GeneralRe: ERROR: (COM) when compiling with MIDL... Pin
Dan Madden11-May-02 10:19
Dan Madden11-May-02 10:19 
Hi Vivek, thanks for the reply! Ok, if this is because of failure, then I will set the value in the IDL myself. It should be an "ADO Recordset" it is returning...It compiled ok now...I added the below to the IDL:

importlib("C:\Program Files\Common Files\System\ADO\MSADO15.DLL");

HRESULT SearchTickets(
[in, out] VARIANT* rsGotSchema,
[in, out] VARIANT* Criteria,
[in, out] VARIANT* ServerName,
[out, retval] _Recordset **ptrRs );

Ok done and I get it compiled, but when ran it errors here (see below):

// param #1: a passed recordset (checked before OK...)
// param #2: Query for the new recordset
// param #3: Server name
// param #4: the recorset to be filled

_RecordsetPtr pRsTickets;

hr = pRsTickets.CreateInstance(__uuidof (Recordset));
if(SUCCEEDED(hr))
{
hr = IQUIZ->SearchTickets(
(VARIANT*)&pRsSchema,
COleVariant("Some query..."),
COleVariant("Server..."),
(_Recordset**) &pRsTickets);

// *****************************************************
// When here, both recordsets have been set to NULL????
// *****************************************************
}

Output from DOS...

BEFORE CreateInstance()...pRsTickets: 0
AFTER CreateInstance()...pRsTickets: 1
BEFORE SearchTickets()...pRsSchema: 1
SearchTickets Failed (hr): -2146827864
AFTER SearchTickets()...pRsTickets: 0
AFTER SearchTickets()...pRsSchema: 0
Release OK...

This is where it blows-up (C:\...VC98\include\COMIP.H):

// Returns the address of the interface pointer contained in this
// class. This is useful when using the COM/OLE interfaces to create
// this interface.
//
Interface** operator&() throw()
{
_Release();
m_pInterface = NULL;
return &m_pInterface;
}

Can you (or anyone) help????



Regards,

Dan
GeneralError in OOP call Pin
pjb7899-May-02 8:57
pjb7899-May-02 8:57 
GeneralRe: Error in OOP call Pin
Joaquín M López Muñoz9-May-02 9:08
Joaquín M López Muñoz9-May-02 9:08 
GeneralRe: Error in OOP call Pin
pjb78910-May-02 5:58
pjb78910-May-02 5:58 
QuestionHow would i got about deleting the last 128 bytes in a file? Pin
redeemer9-May-02 8:13
redeemer9-May-02 8:13 
AnswerRe: How would i got about deleting the last 128 bytes in a file? Pin
Tim Smith9-May-02 8:27
Tim Smith9-May-02 8:27 
AnswerRe: How would i got about deleting the last 128 bytes in a file? Pin
James R. Twine9-May-02 10:23
James R. Twine9-May-02 10:23 
GeneralRe: How would i got about deleting the last 128 bytes in a file? Pin
Peter Liddle9-May-02 11:10
Peter Liddle9-May-02 11:10 
GeneralRe: How would i got about deleting the last 128 bytes in a file? Pin
James R. Twine10-May-02 10:32
James R. Twine10-May-02 10:32 
GeneralChange the caption in PropertyPage Pin
Eugene Pustovoyt9-May-02 7:43
Eugene Pustovoyt9-May-02 7:43 
GeneralRe: Change the caption in PropertyPage Pin
Jason Hooper9-May-02 9:00
Jason Hooper9-May-02 9:00 
GeneralRe: Change the caption in PropertyPage Pin
Eugene Pustovoyt9-May-02 9:23
Eugene Pustovoyt9-May-02 9:23 
GeneralRe: Change the caption in PropertyPage Pin
Tom Archer9-May-02 10:11
Tom Archer9-May-02 10:11 
GeneralRe: Change the caption in PropertyPage Pin
Eugene Pustovoyt9-May-02 17:02
Eugene Pustovoyt9-May-02 17:02 
Generalsort my tree item Pin
pnpfriend9-May-02 7:22
pnpfriend9-May-02 7:22 
GeneralRe: sort my tree item Pin
Joaquín M López Muñoz9-May-02 9:38
Joaquín M López Muñoz9-May-02 9:38 
GeneralRe: sort my tree item Pin
pnpfriend9-May-02 10:15
pnpfriend9-May-02 10:15 
GeneralRe: sort my tree item Pin
Joaquín M López Muñoz9-May-02 10:46
Joaquín M López Muñoz9-May-02 10:46 

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.