🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.clipper.visual-objects
Article #9

Problem with BCB6 created ActiveX Control under CAVO26

#9
From: usenet
Date: Thu, 22 May 2003 20:28
92 lines
3769 bytes
folks,

i've create a simple ActiveX Control with Borland C++ Builder 6, which 
i've tested successfully in VBA  (using a Word document).

using CAVO26 ide, i can generate code using "Tools->Setup OLE 
Control->Generate Class".

"Add to Pallette" works fine, too.

when i try to place the control on a window, i got the following assertion:

ATLASSERT pClientSite == NULL || m_spClientSite == NULL
(see code below)

after that VO crashes (independent of YES, NO, CANCEL)

SetClientSite (see code below) is called from the ActiveX-Container (CAVO).

looking a little in news-archives there was suggested to comment the 
line out, but this leads to a crash.

I think the error is @CAVO, as the OCX works fine with VBA, but i'm not 
sure.

any suggestions?

Remark 1: note that this must not be the main reason that the control 
crashes.

Remark 2: i'm really not sure where to set the followup. please decide 
if your post is a subject for both groups.

form \Cbuilder6\Include\Atl\atlctl.h
//--------------------------------------------------------------------------------------------
inline HRESULT CComControlBase::IOleObject_SetClientSite(IOleClientSite 
*pClientSite)
{
    ATLASSERT(pClientSite == NULL || m_spClientSite == NULL);
    m_spClientSite = pClientSite;
    m_spAmbientDispatch.Release();
    if (m_spClientSite != NULL)
    {
        m_spClientSite->QueryInterface(IID_IDispatch,
            (void**) &m_spAmbientDispatch.p);
    }
    return S_OK;
}
//--------------------------------------------------------------------------------------------


Voerror.txt

***********************ERROR********************************
CA-Visual Objects (Version 2.6.0, Build 1151), Version 2.6
22.05.2003 22:20:52
Application: C:\Programme\CAVO26\BIN\Testcont.exe
 
Error message:
--------------
Error Code:  50 [ ACCESS VIOLATION ]
Subsystem: VO-CODE
Error Subcode: 5333
Function:
Argument Number: 7

Error Object created:
--------------------
SubSystem       :VO-CODE
SubCode         :5333
GenCode         :Access Violation
ExceptionCode   :0EEDFADE
ExceptionFlags  :00000001
ExceptionAddress:77F1D642
ParamNumber     :7
ExceptionInfo   :051BEACC
Severity        :2
CanDefault      :.F.
CanRetry        :.F.
CanSubstitute   :.F.
Operation       :
Description     :
FileName        :
Tries           :0
FileHandle      :0
SubCodeText     :
Arg             :
ArgTypeReq      :NIL
MaxSize         :0
SubstituteType  :NIL
CallFuncSym     :
--------------------
Technical Details
Message-ID: <3ECD3309.1090109@null.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!syros.belnet.be!news.belnet.be!cleanfeed.casema.net!skynet.be!skynet.be!Amsterdam.Infonet!News.Amsterdam.UnisourceCS!news.otenet.gr!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f9701,1f22dfe8ac3b6971,start
X-Google-Attributes: gidf9701,public
X-Google-Thread: 11629a,1f22dfe8ac3b6971,start
X-Google-Attributes: gid11629a,public
X-Google-ArrivalTime: 2003-05-22 22:30:35 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!syros.belnet.be!news.belnet.be!cleanfeed.casema.net!skynet.be!skynet.be!Amsterdam.Infonet!News.Amsterdam.UnisourceCS!news.otenet.gr!not-for-mail
From: usenet <void@null.com>
Newsgroups: comp.lang.clipper.visual-objects,borland.public.cppbuilder.activex
Subject: Problem with BCB6 created ActiveX Control under CAVO26
Date: Thu, 22 May 2003 22:28:57 +0200
Organization: ABEON
Lines: 94
Message-ID: <3ECD3309.1090109@null.com>
NNTP-Posting-Host: athei53-b-091.otenet.gr
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: usenet.otenet.gr 1053631568 15922 62.103.182.91 (22 May 2003 19:26:08 GMT)
X-Complaints-To: abuse@otenet.gr
NNTP-Posting-Date: Thu, 22 May 2003 19:26:08 +0000 (UTC)
User-Agent: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.0.2) Gecko/20030208 Netscape/7.02
X-Accept-Language: el,de,en