Problem intergrating VBA 6.2 
Author Message
 Problem intergrating VBA 6.2

I am wondering if the problem I am experiencing with intergrating VBA 6.2 in
my app has a work-around.  Here it is:
the document class is defined as:
class CSiebToolboxDoc : public CApcDualDyn<
      CApcDocument<CSiebToolboxDoc,COleDocument>,
                  Document,
                  IDualDocument,
                  &IID_IDualDocument>
When the VBA Editor is instanciated, the app creates a project
automatically.  In order to do this, the doc class must be derived from
COleDocument so it can use the Compound Files.  I called
EnableCompoundFile(); in my doc constructor.  The problem occurs when I call
this:
     hr = pDoc->ApcProject.InitNew(pDoc->m_lpRootStg);
Before the call, I check the value of pDoc->m_lpRootStg and the value is
valid.  I step into the InitNew function and the value of the pointer
changed to 0x00000001.  Has anybody seen something like this before.

PS: I am running VC++ 6.0 SP5 on WIN95.  I based my self on a sample program
which was supplied with the VBA SDK.  The sample was built with an erlier
version of VC++ (5.0) and the executable works but, when I compile it and
then run it, the same bug occurs.

Any help would be appriciated...



Wed, 08 Oct 2003 04:34:11 GMT  
 Problem intergrating VBA 6.2
Louis,

You say the value of pDoc->m_lpRootStg is valid.  Does this mean that
you have called StgCreateDocfile to initialize it?  This is how it becomes
valid.
If you have not, that is most likely your problem.

Hope this help,
Drew


Quote:
> I am wondering if the problem I am experiencing with intergrating VBA 6.2
in
> my app has a work-around.  Here it is:
> the document class is defined as:
> class CSiebToolboxDoc : public CApcDualDyn<
>       CApcDocument<CSiebToolboxDoc,COleDocument>,
>                   Document,
>                   IDualDocument,
>                   &IID_IDualDocument>
> When the VBA Editor is instanciated, the app creates a project
> automatically.  In order to do this, the doc class must be derived from
> COleDocument so it can use the Compound Files.  I called
> EnableCompoundFile(); in my doc constructor.  The problem occurs when I
call
> this:
>      hr = pDoc->ApcProject.InitNew(pDoc->m_lpRootStg);
> Before the call, I check the value of pDoc->m_lpRootStg and the value is
> valid.  I step into the InitNew function and the value of the pointer
> changed to 0x00000001.  Has anybody seen something like this before.

> PS: I am running VC++ 6.0 SP5 on WIN95.  I based my self on a sample
program
> which was supplied with the VBA SDK.  The sample was built with an erlier
> version of VC++ (5.0) and the executable works but, when I compile it and
> then run it, the same bug occurs.

> Any help would be appriciated...



Sun, 12 Oct 2003 05:54:57 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. VBA 6.2 on VC 6.0 SP5

2. Turbo C++ / MS DOS 6.2 incompatible ?

3. blocking write on RedHat Linux 6.2 glibc 2.1.3

4. raw keyboard input on Irix 6.2

5. OT: glibc In Linux RedHat 6.2 and ANCI C fflush(stdin)

6. flashing screen for DOS 6.2 in C

7. MS-DOS 6.2 Memory Exception

8. Borland Compiler acts wierd under DOS 6.2

9. Borland C V3.1 and dos 6.2 headache

10. std::map and NuMega boundschecker 6.2

11. Netscape 6.2 ignores style attribures returned from .NET

12. how to intergrate visual c++ with visual basic?

 

 
Powered by phpBB® Forum Software