Is Powerpoint still a single instance app?

S

Steve Rindsberg

I feel like I belong in a room with padded walls.

It's not so bad here. You might learn to like it. It doesn't give you that satisfying "THUNK"
when you bang your head on the walls but it doesn't leave that lingering headache either.
 
H

Howard Kaikow

i managed to add a Form, by creating a new C++ project and copying the code.

Now, I think I have to change public stuff to private stuff so I can access
the controls in the code.
this-> does not work in public procedure.
 
M

Mike M.

Sounds like you have your hands full. I only use Visual c++ 6.0. I haven't
been given the opportunity to use .NET yet. In my c++ apps I create a
logging class/function to write all of my debugging info to a file. That is
easier than trying to watch it scroll past in a control or the output
window. You should also be able to compile a debug version and step through
the code. You won't be able to poke into the structures you are looking at
since they are probably COM interfaces. However, you can assign the
structure values returned to local variables and then look at them. If I
wasn't so busy I would try to look at the structures you mentioned. I will
have to wait for some quiet time before I can do that. I anticipate that in
about 25 years. ;-)

Be advised that some of the COM interfaces are somewhat wacky. All of the
help is in VB parlance and you have to sort of guestimate into c++ or look
at the generated .tlh and tli files after including the PowerPoint type
library.

Good luck.
 
H

Howard Kaikow

Mike M. said:
Sounds like you have your hands full. I only use Visual c++ 6.0. I haven't
been given the opportunity to use .NET yet. In my c++ apps I create a
logging class/function to write all of my debugging info to a file. That is
easier than trying to watch it scroll past in a control or the output
window. You should also be able to compile a debug version and step through
the code. You won't be able to poke into the structures you are looking at
since they are probably COM interfaces. However, you can assign the
structure values returned to local variables and then look at them. If I
wasn't so busy I would try to look at the structures you mentioned. I will
have to wait for some quiet time before I can do that. I anticipate that in
about 25 years. ;-)

Be advised that some of the COM interfaces are somewhat wacky. All of the
help is in VB parlance and you have to sort of guestimate into c++ or look
at the generated .tlh and tli files after including the PowerPoint type
library.

Good luck.

What are .tlh and .tli files?
There are no such critters in the .NET project's directories.

Powerpoint, itself, has no effect on the code, other than the code detecting
"powerpnt.exe".

I have possible good news, but first.

I purchased MSFT C/C++, I guess it was version 5, about 7-0 years ago, when
I decideed to try my hand woth WLLs in Office 95.

Very shortly after that purchase, MSFT released/announced Office 97, so I
ditched the idea of using C/C++ and got VB 5 Learning edition, and then VB 6
Enterprise.

I also have MSFT Visual C/C++ 6 Learning edition, indeed I have two copies,
that came with books. This helped because I was abe to compile and then
import the workspace into .NET.

However, I have NO Visual C/C++ 6 books that talk about Forms. Heck one of
the books EXPLICITLY states that ALL examples will be for console
applications.

A difficulty is that the single C++ .NET book I have was for VS .NET 2002
and it had nothing about Windows forms for C++, and almost nothing about
Managed software,

In recent daze, I've been plodding thru MSDN, the KB, the Help, etc..
There's (relatively) very little for C++, everything is for C# and VB .NET.

Yesterday, I ordered Kate Gregory's book, hope that helps in the future, as
I do expect that there will be other times I wish to see how particular
C/C++ works.

I thought about throwing the info into a file, but I wanted to use a Form,
and ever the masochist, I do intend to convert the code to C#, VB .NET and
VB 6.

Now for the good news.

The structures are directly addressable, as are most structures used in the
API. That's the easy part.

As I stated in recent daze, the usage count for powerpnt.exe does not seem
to get updated, but now that I can output to a Form, I can better see the
results.

Many/all of the modules associated with powerpnt.exe do expose usage counts.
I would hope/expect that one of those DLLs will reveal what I've been after.

Now that I better understand what the code does, I'm going to try to do the
following, which is expedited by having a Form.

1. Let the code merrily plod along listing processes in a listbox.
2. When the code finds the powerpoint process, clear the listbox, output the
powerpoint info and terminate the loop.
3. Output the content of the list to a file.
4. Run the program with 1, 2, and 3 powerpoint objects running and hope!
 
M

Mike M.

Howard Kaikow said:
What are .tlh and .tli files?
There are no such critters in the .NET project's directories.

These are include files generated by Visual studio when you import a type
library. They are similar to standard header files that define the
classes, functions and paramaters for the interface (Powerpoint in this
case).
Powerpoint, itself, has no effect on the code, other than the code detecting
"powerpnt.exe".

I have possible good news, but first.

I purchased MSFT C/C++, I guess it was version 5, about 7-0 years ago, when
I decideed to try my hand woth WLLs in Office 95.

Very shortly after that purchase, MSFT released/announced Office 97, so I
ditched the idea of using C/C++ and got VB 5 Learning edition, and then VB 6
Enterprise.

I also have MSFT Visual C/C++ 6 Learning edition, indeed I have two copies,
that came with books. This helped because I was abe to compile and then
import the workspace into .NET.

However, I have NO Visual C/C++ 6 books that talk about Forms. Heck one of
the books EXPLICITLY states that ALL examples will be for console
applications.

A difficulty is that the single C++ .NET book I have was for VS .NET 2002
and it had nothing about Windows forms for C++, and almost nothing about
Managed software,

In recent daze, I've been plodding thru MSDN, the KB, the Help, etc..
There's (relatively) very little for C++, everything is for C# and VB ..NET.

Yesterday, I ordered Kate Gregory's book, hope that helps in the future, as
I do expect that there will be other times I wish to see how particular
C/C++ works.

I thought about throwing the info into a file, but I wanted to use a Form,
and ever the masochist, I do intend to convert the code to C#, VB .NET and
VB 6.

Now for the good news.

The structures are directly addressable, as are most structures used in the
API. That's the easy part.

As I stated in recent daze, the usage count for powerpnt.exe does not seem
to get updated, but now that I can output to a Form, I can better see the
results.

Many/all of the modules associated with powerpnt.exe do expose usage counts.
I would hope/expect that one of those DLLs will reveal what I've been after.

Now that I better understand what the code does, I'm going to try to do the
following, which is expedited by having a Form.

1. Let the code merrily plod along listing processes in a listbox.
2. When the code finds the powerpoint process, clear the listbox, output the
powerpoint info and terminate the loop.
3. Output the content of the list to a file.
4. Run the program with 1, 2, and 3 powerpoint objects running and hope!
When I want to use a form I let MFC do the work. In Visual Studio you view
the workspace (explorer like area on left) and click on the resources tab.
Expand that, right click the item Dialog and then select new. This adds a
modal dialog that you can reference and show and place controls on.

Good luck.
 
H

Howard Kaikow

Mike M. said:
These are include files generated by Visual studio when you import a type
library. They are similar to standard header files that define the
classes, functions and paramaters for the interface (Powerpoint in this
case).

I've not seen any of those with C++ .NET.
When I want to use a form I let MFC do the work. In Visual Studio you view
the workspace (explorer like area on left) and click on the resources tab.
Expand that, right click the item Dialog and then select new. This adds a
modal dialog that you can reference and show and place controls on.

I guess that's for pre C++ .NET.

Ran into a major issue trying to use ofstream.

I just could not get code running in C++ .NET 2003 yesterday.
Today, I found out, the hard way, why.

I created a project in C++ V6, np problem getting code running.
I then import into C++ .NET 2002, no problem getting code running, but, and
I do have a big butt, there was a warning that the stream stuff was
deprecated.

I then impor the c++ .NET 2002 into C++ .NET 2003.
Code no longer works.
I found an article that points out that, among others, fstream.h and
iostream.h have to be replaced without the ".h", but that's not enough.

I posed a query in the .NET C newsgroup.

In addition to Kate Gregory's book, I ordered C++ Step by Step, maybe the
answers will lie there.
Probably requires some sort of namespace hanky panky.
You'd think that for such a serious deprecation/removal of a library,
there'd be a clear example of a BEFORE and an AFTER. If tere is, I've not
yet found it.
 
H

Howard Kaikow

Eureka, I think!

I believe that I can demonstrate how to detect whether there is 1, or more
than 1, use of Powerpoint, but I want to convert the code to C#, then VB
..NET, then VB 6 before I post a test.

This was interesting, but exhausting.
 
S

Steve Rindsberg

Eureka, I think!

I believe that I can demonstrate how to detect whether there is 1, or more
than 1, use of Powerpoint, but I want to convert the code to C#, then VB
..NET, then VB 6 before I post a test.

This was interesting, but exhausting.

Whether it works or not, extra points and a Gold Persistence Pin to you for
gnawing at it this long!
 
M

Mike M.

Yes. That deserves a nice pint. And now we can digress to a discussion on
which is better, English ales or Australian lagers. With lots of taste
testing everyone comes out a winner. ;-)

Cheers Howard.
 
H

Howard Kaikow

Steve Rindsberg said:
Whether it works or not, extra points and a Gold Persistence Pin to you for
gnawing at it this long!

I just started convberting the C++ to C#, not as easy as I thought it would
be.

I'm going to dumb out my brain by watching Charlie's Angels on TV tonight!
 
H

Howard Kaikow

Mike M. said:
Yes. That deserves a nice pint. And now we can digress to a discussion on
which is better, English ales or Australian lagers. With lots of taste
testing everyone comes out a winner. ;-)

I've not had a drink since May 1994.

FYI:

When a second use of PPT is started the PPT thread count increases by 1
and, most interestingly, one of the previous threads is replaced by two
threads. This does not change if a 3rd use is started, so it would appear
that one thread is associated with the actual PPT instance, whilst the other
monitors the (other) uses.

Usage counts are not changed,
 
M

Mike M.

Hmm, that sounds somewhat nebulous. It will be surprising if the different
versions of PPT work the same way.
 
H

Howard Kaikow

Mike M. said:
Hmm, that sounds somewhat nebulous. It will be surprising if the different
versions of PPT work the same way.

Actually, it makes perfect sense.
In time, we'll find out.

PPT has to have SOMETHING monitoring the uses.
Usage counts are changed on oleaut32.dll and msi.dll and userenv.dll, but
only when the 2nd use is added, not the 3rd. Of course, one cannot use those
usage counts because they apply to other than PPT as well.
 
H

Howard Kaikow

I'm going to dumb out my brain by watching Charlie's Angels on TV tonight!

Egad!

I'd forgotten that I had already seen the Charlie's Angels move and just how
bad it was.
I've seen few movies that were worse.
 
J

John O

I've seen few movies that were worse.Your kids must not watch Disney or Nickelodeon. :)

My proper brain dumb-out involves the Three Stooges, the Farrelly brothers,
Beavis, Nigel Tufnel, or a guy polishing up an old blue Chevy while 'Low
Rider' is playing.

John O
hey...it's Friday!
 
H

Howard Kaikow

I guess watching Charlie's Angets did not destroy too many brain cells.

I recalled that many/most APIs \have Framework equivalemts.
Might be easier to use those than to port the API, pointers, etc into C# and
VB .NET.
Of course, that won't help with the ultimate goal of getting the stuff into
VB 6.
 
H

Howard Kaikow

John O said:
Your kids must not watch Disney or Nickelodeon. :)

I have no kids of which I am aware.
Nor do I have cable.
My proper brain dumb-out involves the Three Stooges, the Farrelly brothers,
Beavis, Nigel Tufnel, or a guy polishing up an old blue Chevy while 'Low
Rider' is playing.

TV has gotton so bad, most anything on TV is a dumb out.
 
S

Steve Rindsberg

Egad!

I'd forgotten that I had already seen the Charlie's Angels move and just how
bad it was.
I've seen few movies that were worse.

Hmm. The stupid pills aren't working. He's seen through it.
 
H

Howard Kaikow

C# version is done.
Rather more difficult than I expected, but th eproblems addressed likely
will make it easier to do a VB.NET version.

Expect to start on the VB .NET version this weekend.
Then coes the biggie, the VB 6 version, one can only hope!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top