Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ActiveX -- Microsoft Tools Only?

1 view
Skip to first unread message

P. Simon Tuffs

unread,
May 5, 1996, 3:00:00 AM5/5/96
to

So, I download the ActiveX developer kit, and I'm trying to compile
the basic framework it in my Borland 5.0 compiler (yes, I don't use
the Microsoft tools). And after a mighty struggle I get through all
the compilation errors and Microsoft specific nastiers buried in the
code, and finally -- tada -- it doesn't link.

Some clever *!@!* put #pragma comment(lib, "uuid.lib") and #pragma
comment(lib, "uuid3.lib") throughout the ActiveX SDK headers, to force
automatic linking to these libraries. And guess what? They're
pre-built and cannot be linked with other than the Microsoft tools.
AAAARRRGGGHHH!

So, does anybody out there have any idea where I can pick up the
sources to these mystery libraries....


+----------------+-----------------------------------------------+
| P. Simon Tuffs | Creators of WaveWorks: The high-performance |
| President | sound-editor for Microsoft Windows platforms. |
| I.S.I.S. | Visit us at http://www.waveworks.com or |
| | download our shareware release |
| | http://www.waveworks.com/ww/wwdl.htm |
+----------------+-----------------------------------------------+


Bradd W. Szonye

unread,
May 5, 1996, 3:00:00 AM5/5/96
to

On Saturday, May 04, 1996, P. Simon Tuffs wrote...


> So, I download the ActiveX developer kit, and I'm trying to compile
> the basic framework it in my Borland 5.0 compiler (yes, I don't use
> the Microsoft tools). And after a mighty struggle I get through all
> the compilation errors and Microsoft specific nastiers buried in the
> code, and finally -- tada -- it doesn't link.
>
> Some clever *!@!* put #pragma comment(lib, "uuid.lib") and #pragma
> comment(lib, "uuid3.lib") throughout the ActiveX SDK headers, to force
> automatic linking to these libraries. And guess what? They're
> pre-built and cannot be linked with other than the Microsoft tools.
> AAAARRRGGGHHH!
>
> So, does anybody out there have any idea where I can pick up the
> sources to these mystery libraries....
>

I'll bet you a dollar they're proprietary, and available only in
object-code form.

You *could* get the Microsoft Portable Executable / COFF specification
from MSDN or Pietrek's "Windows 95 System Programming Secrets" and
reverse-engineer Borland's format, then write your own linker. Probably
make a bit of money off it too.

Of course, you could also repaint your home and put in a new landscaping
so that it would all blend in more aesthetically with your neighbors'
property, but you probably don't want to do that either. Not even if they
offered to pay you.
--
Bradd W. Szonye (bra...@ix.netcom.com), Doubleplus Corporation

"To chill or to pop a cap in my dome, whoomp, there it is."
-- Hamlet, Prince of Denmark


John Lockwood

unread,
May 5, 1996, 3:00:00 AM5/5/96
to

Bradd W. Szonye <bra...@ix.netcom.com> wrote:

>You *could* get the Microsoft Portable Executable / COFF specification
>from MSDN or Pietrek's "Windows 95 System Programming Secrets" and
>reverse-engineer Borland's format

I don't think you'd need to reverse engineer it. I don't believe its
proprietary; my understanding is that it simply doesn't use COFF, just
some other (published) format -- I forget which one.


John


KTL

unread,
May 5, 1996, 3:00:00 AM5/5/96
to

Bradd W. Szonye wrote:
>
> On Saturday, May 04, 1996, P. Simon Tuffs wrote...
> > So, I download the ActiveX developer kit, and I'm trying to compile
> > the basic framework it in my Borland 5.0 compiler (yes, I don't use
> > the Microsoft tools). And after a mighty struggle I get through all
> > the compilation errors and Microsoft specific nastiers buried in the
> > code, and finally -- tada -- it doesn't link.
> >
> > Some clever *!@!* put #pragma comment(lib, "uuid.lib") and #pragma
> > comment(lib, "uuid3.lib") throughout the ActiveX SDK headers, to force
> > automatic linking to these libraries. And guess what? They're
> > pre-built and cannot be linked with other than the Microsoft tools.
> > AAAARRRGGGHHH!
> >
> > So, does anybody out there have any idea where I can pick up the
> > sources to these mystery libraries....
> >
Isn't "uuid.lib" library generate UID? This is require to developed
OLE controls. Why don't you check how Borland generate UID and may be
you don't need to link it at all?

KTL

P. Simon Tuffs

unread,
May 6, 1996, 3:00:00 AM5/6/96
to

Bradd W. Szonye <bra...@ix.netcom.com> wrote:

>On Saturday, May 04, 1996, P. Simon Tuffs wrote...
>> So, I download the ActiveX developer kit, and I'm trying to compile
>> the basic framework it in my Borland 5.0 compiler (yes, I don't use
>> the Microsoft tools). And after a mighty struggle I get through all
>> the compilation errors and Microsoft specific nastiers buried in the
>> code, and finally -- tada -- it doesn't link.
>>
>> Some clever *!@!* put #pragma comment(lib, "uuid.lib") and #pragma
>> comment(lib, "uuid3.lib") throughout the ActiveX SDK headers, to force
>> automatic linking to these libraries. And guess what? They're
>> pre-built and cannot be linked with other than the Microsoft tools.
>> AAAARRRGGGHHH!
>>
>> So, does anybody out there have any idea where I can pick up the
>> sources to these mystery libraries....
>>

>I'll bet you a dollar they're proprietary, and available only in
>object-code form.
Umph.

>You *could* get the Microsoft Portable Executable / COFF specification
>from MSDN or Pietrek's "Windows 95 System Programming Secrets" and

>reverse-engineer Borland's format, then write your own linker. Probably
>make a bit of money off it too.

Groan.

>Of course, you could also repaint your home and put in a new landscaping
>so that it would all blend in more aesthetically with your neighbors'
>property, but you probably don't want to do that either. Not even if they
>offered to pay you.
>--

Sound's better than reverse engineering software, at least you can see
the results at the end. Actually, I think all the libraries export is
constants for the OLE interfaces. Why they don't do like everybody
else and stick them in a header and #include them is one of the
mysteries of life, one of many when you deal with Microsoft. I'll
stick them into a copy of VC++ this week and see what pops out.

>Bradd W. Szonye (bra...@ix.netcom.com), Doubleplus Corporation

P. Simon Tuffs

unread,
May 6, 1996, 3:00:00 AM5/6/96
to

java...@best.com (John Lockwood) wrote:

>Bradd W. Szonye <bra...@ix.netcom.com> wrote:

>>You *could* get the Microsoft Portable Executable / COFF specification
>>from MSDN or Pietrek's "Windows 95 System Programming Secrets" and

>>reverse-engineer Borland's format

>I don't think you'd need to reverse engineer it. I don't believe its
>proprietary; my understanding is that it simply doesn't use COFF, just
>some other (published) format -- I forget which one.

Sounds like it might be the only thing left to do. I dummied out the
uuid.lib and uuid3.lib files, and linked, and discovered 18
undefineds, many of which were function calls. No chance of dummying
out those and getting anything sensible.

So Microsoft (If you're out there listening) ARE YOU GOING TO FIX
THIS, OR SHOULD I GO LEARN JAVA? (I'm a little frustrated with
microsoft's feedback (broken) and online support (apparently non
existant now Compuserve forums have gone).

Anyway, Thanks for the suggestions John,

Regards,
Simon .

>John

John Lockwood

unread,
May 6, 1996, 3:00:00 AM5/6/96
to

si...@waveworks.com (P. Simon Tuffs) wrote:

>java...@best.com (John Lockwood) wrote:

>Anyway, Thanks for the suggestions John,

It wasn't really a suggestion, just my two cents about the Borland
object file format. If it were me I'd probably just get the MS tools
and get the code running.


John


Robert Mashlan

unread,
May 6, 1996, 3:00:00 AM5/6/96
to

si...@waveworks.com (P. Simon Tuffs) wrote:


>Some clever *!@!* put #pragma comment(lib, "uuid.lib") and #pragma
>comment(lib, "uuid3.lib") throughout the ActiveX SDK headers, to force
>automatic linking to these libraries. And guess what? They're
>pre-built and cannot be linked with other than the Microsoft tools.
>AAAARRRGGGHHH!
>
>So, does anybody out there have any idea where I can pick up the
>sources to these mystery libraries....

Try linking ole2w32.lib or ole2w16.lib. They should be in your
Borland lib directory.

rm

---
Robert Mashlan R2M Software rmas...@r2m.com http://r2m.com/~rmashlan
Internet Resources for Windows Developers http://www.r2m.com/windev/

P. Simon Tuffs

unread,
May 7, 1996, 3:00:00 AM5/7/96
to

rmas...@r2m.com (Robert Mashlan) wrote:

>si...@waveworks.com (P. Simon Tuffs) wrote:


>>Some clever *!@!* put #pragma comment(lib, "uuid.lib") and #pragma
>>comment(lib, "uuid3.lib") throughout the ActiveX SDK headers, to force
>>automatic linking to these libraries. And guess what? They're
>>pre-built and cannot be linked with other than the Microsoft tools.
>>AAAARRRGGGHHH!
>>
>>So, does anybody out there have any idea where I can pick up the
>>sources to these mystery libraries....

>Try linking ole2w32.lib or ole2w16.lib. They should be in your
>Borland lib directory.

Unfortunately I still have 18 undefined symbols after linking with
OLE, some of which are functions. So I'm stuck. Ahh well, I'll just
have to go buy the Microsoft VC++ 4.0... or wait until they fix this
problem (if ever).

Thanks for the help,

Simon Tuffs.

P. Simon Tuffs

unread,
May 7, 1996, 3:00:00 AM5/7/96
to

KTL <k...@cais.com> wrote:

>Bradd W. Szonye wrote:
>>
>> On Saturday, May 04, 1996, P. Simon Tuffs wrote...
>> > So, I download the ActiveX developer kit, and I'm trying to compile
>> > the basic framework it in my Borland 5.0 compiler (yes, I don't use
>> > the Microsoft tools). And after a mighty struggle I get through all
>> > the compilation errors and Microsoft specific nastiers buried in the
>> > code, and finally -- tada -- it doesn't link.
>> >

>> > Some clever *!@!* put #pragma comment(lib, "uuid.lib") and #pragma
>> > comment(lib, "uuid3.lib") throughout the ActiveX SDK headers, to force
>> > automatic linking to these libraries. And guess what? They're
>> > pre-built and cannot be linked with other than the Microsoft tools.
>> > AAAARRRGGGHHH!
>> >
>> > So, does anybody out there have any idea where I can pick up the
>> > sources to these mystery libraries....
>> >

>Isn't "uuid.lib" library generate UID? This is require to developed
>OLE controls. Why don't you check how Borland generate UID and may be
>you don't need to link it at all?

Unfortunately it seems to contain a bunch of functions as well as
UID's: however I'll look further into the problem... Thanks.

>KTL
Simon.

Jonathan Borden

unread,
May 7, 1996, 3:00:00 AM5/7/96
to

In article <318e712c...@news.transport.com>, rmas...@r2m.com (Robert Mashlan) writes:
> si...@waveworks.com (P. Simon Tuffs) wrote:
>
>
>>Some clever *!@!* put #pragma comment(lib, "uuid.lib") and #pragma
>>comment(lib, "uuid3.lib") throughout the ActiveX SDK headers, to force
>>automatic linking to these libraries. And guess what? They're
>>pre-built and cannot be linked with other than the Microsoft tools.
>>AAAARRRGGGHHH!
>>
>>So, does anybody out there have any idea where I can pick up the
>>sources to these mystery libraries....
>
> Try linking ole2w32.lib or ole2w16.lib. They should be in your
> Borland lib directory.
>
to the original poster :

They've given you the IDL files .... these libraries are just
a bunch of IID defs which result from creating a static library from the
compiled x_i.c files generated by MIDL. lets face it, if you are
going to use Borland tools, you are going to need to be slightly clever.

same for ATL, if you don't care to use the MFC ole implementation then
you're going to need to implement a few interfaces yourself...


jon borden
JABR Technology

P. Simon Tuffs

unread,
May 8, 1996, 3:00:00 AM5/8/96
to

jka...@opal.tufts.edu (Jonathan Borden) wrote:

>In article <318e712c...@news.transport.com>, rmas...@r2m.com (Robert Mashlan) writes:
>> si...@waveworks.com (P. Simon Tuffs) wrote:
>>
>>
>>>Some clever *!@!* put #pragma comment(lib, "uuid.lib") and #pragma
>>>comment(lib, "uuid3.lib") throughout the ActiveX SDK headers, to force
>>>automatic linking to these libraries. And guess what? They're
>>>pre-built and cannot be linked with other than the Microsoft tools.
>>>AAAARRRGGGHHH!
>>>
>>>So, does anybody out there have any idea where I can pick up the
>>>sources to these mystery libraries....

> They've given you the IDL files .... these libraries are just


>a bunch of IID defs which result from creating a static library from the
>compiled x_i.c files generated by MIDL. lets face it, if you are
>going to use Borland tools, you are going to need to be slightly clever.

Ahh, it's starting to become clear. I'm very new to OLE programming,
so I didn't know this fact. I'll try creating the .c files again from
the MIDL compiler and see what pops out.

> same for ATL, if you don't care to use the MFC ole implementation then
>you're going to need to implement a few interfaces yourself...

I'll cheat and use the BOCOLE classes. You're right about having to
be a little bit clever: If I hadn't got this large OWL application I'd
be using the Microsoft and MFC tools. That'll teach me to be an early
adopter (well, nothing has so far so maybe it won't).

>jon borden
>JABR Technology
>
Many thanks,

Simon Tuffs.

P. Simon Tuffs

unread,
May 8, 1996, 3:00:00 AM5/8/96
to

jka...@opal.tufts.edu (Jonathan Borden) wrote:

> to the original poster :

> They've given you the IDL files .... these libraries are just
>a bunch of IID defs which result from creating a static library from the
>compiled x_i.c files generated by MIDL. lets face it, if you are
>going to use Borland tools, you are going to need to be slightly clever.

Well I grepped all of the files in the INETSDK, and none of the IDL
files contain the missing interface definitions such as
IID_IBindStatusCallback, nor apparently any of the functions also
exported by uuid.lib. So I'm stuck.

> same for ATL, if you don't care to use the MFC ole implementation then
>you're going to need to implement a few interfaces yourself...

Any hints as to any other non Microsoft/Non MFC frameworks to create
OCX's or ActiveX's would be appreciated.

HEY BORLAND, ARE YOU LISTENING?!!!

>jon borden
>JABR Technology
>
Simon.

Alan C Francis

unread,
May 9, 1996, 3:00:00 AM5/9/96
to

On 08 May 1996, P. Simon Tuffs wrote...


> Any hints as to any other non Microsoft/Non MFC frameworks to create
> OCX's or ActiveX's would be appreciated.

Doesn't Borland 5.0 compile MFC ? Could you build the OCX using
MFC/ActiveX and the rest of te app using OWL ? Would the ActiveX SDK work
on a borland MFC project ?

Alan

Howard M. Swope III

unread,
May 9, 1996, 3:00:00 AM5/9/96
to

P. Simon Tuffs wrote:

>
> rmas...@r2m.com (Robert Mashlan) wrote:
>
> >si...@waveworks.com (P. Simon Tuffs) wrote:
>
> >>Some clever *!@!* put #pragma comment(lib, "uuid.lib") and #pragma
> >>comment(lib, "uuid3.lib") throughout the ActiveX SDK headers, to force
> >>automatic linking to these libraries. And guess what? They're
> >>pre-built and cannot be linked with other than the Microsoft tools.
> >>AAAARRRGGGHHH!
> >>
> >>So, does anybody out there have any idea where I can pick up the
> >>sources to these mystery libraries....
>
> >Try linking ole2w32.lib or ole2w16.lib. They should be in your
> >Borland lib directory.
>
> Unfortunately I still have 18 undefined symbols after linking with
> OLE, some of which are functions. So I'm stuck. Ahh well, I'll just
> have to go buy the Microsoft VC++ 4.0... or wait until they fix this
> problem (if ever).
>

You are probably better of workin in VC++. I moved from the boreland with
the release of VC++ 2.0 and haven't looked back. VC++ is awesome. If you are
developing for NT you might as well write in the same language the OS was
developed in. The IDE is awesome the books are incredible (I pretty much
taught myself windows programming and C++ with them. It is just a joy to
use. Once might as well be speaking their native to tongue to the machine.


> Thanks for the help,
>
> Simon Tuffs.

> +----------------+-----------------------------------------------+
> | P. Simon Tuffs | Creators of WaveWorks: The high-performance |
> | President | sound-editor for Microsoft Windows platforms. |
> | I.S.I.S. | Visit us at http://www.waveworks.com or |
> | | download our shareware release |
> | | http://www.waveworks.com/ww/wwdl.htm |
> +----------------+-----------------------------------------------+

--
Howard M. Swope III H H MM MM SSSSS HMS Designs
[@ @] HHHH M M M SS
\-/ H H M M SS Software Design &
hsw...@voicenet.com SSSSSSSSSSSSSSSSSSDESIGNS Microcomputer Services
[http://www.voicenet.com/~hswope]

P. Simon Tuffs

unread,
May 9, 1996, 3:00:00 AM5/9/96
to

"Howard M. Swope III" <hsw...@voicenet.com> wrote:


>You are probably better of workin in VC++. I moved from the boreland with
>the release of VC++ 2.0 and haven't looked back. VC++ is awesome. If you are
>developing for NT you might as well write in the same language the OS was
>developed in. The IDE is awesome the books are incredible (I pretty much
>taught myself windows programming and C++ with them. It is just a joy to
>use. Once might as well be speaking their native to tongue to the machine.

I've used the VC++ product as well as the Borland product, and each
has its strengths. If I didn't have a large OWL-1 app to get out ASAP
I'd probably make the switch. As it is, I'm looking for a way to wrap
my existing code up as an OCX, and not have to do a complete rewrite.

I'm not as enthused with the Microsoft tools yet, perhaps that will
come with more exposure :)

>--
>Howard M. Swope III H H MM MM SSSSS HMS Designs
> [@ @] HHHH M M M SS
> \-/ H H M M SS Software Design &
>hsw...@voicenet.com SSSSSSSSSSSSSSSSSSDESIGNS Microcomputer Services
> [http://www.voicenet.com/~hswope]

Simon.

P. Simon Tuffs

unread,
May 9, 1996, 3:00:00 AM5/9/96
to

That's something I'm considering. I'll let you know if I make
progress... P.S. The OWL in your URL isn't related to OWL is it?

>Alan

Mike Lemons

unread,
May 9, 1996, 3:00:00 AM5/9/96
to

I have Microsoft VC++ 4.1 and I couldn't get the inetsdk stuff to link
until I received the April Developer's Network disks with Internet
support in the win-32 SDK. So good luck using Borland.

--
Mike Lemons | "In 20th-century Old Earth, a fast food chain
mi...@crash.cts.com| took dead cow meat, fried it in grease, added
| carcinogens, wrapped it in petroleum-based foam,
| and sold 900,000,000,000 units. Human Beings.
| Go figure." Dan Simmons - Hyperion

Steve Crook

unread,
May 10, 1996, 3:00:00 AM5/10/96
to

+ You are probably better of workin in VC++. I moved from the boreland with
+ the release of VC++ 2.0 and haven't looked back. VC++ is awesome. If you are
+ developing for NT you might as well write in the same language the OS was
+ developed in. The IDE is awesome the books are incredible (I pretty much
+ taught myself windows programming and C++ with them. It is just a joy to
+ use. Once might as well be speaking their native to tongue to the machine.

Can I have some of whatever it is that you're taking ?

calvin

unread,
May 10, 1996, 3:00:00 AM5/10/96
to

Save yourself the trouble, do it in Java. Crossplatform anyway.

si...@waveworks.com (P. Simon Tuffs) wrote:

>jka...@opal.tufts.edu (Jonathan Borden) wrote:

>>In article <318e712c...@news.transport.com>, rmas...@r2m.com (Robert Mashlan) writes:

>>> si...@waveworks.com (P. Simon Tuffs) wrote:
>>>
>>>
>>>>Some clever *!@!* put #pragma comment(lib, "uuid.lib") and #pragma
>>>>comment(lib, "uuid3.lib") throughout the ActiveX SDK headers, to force
>>>>automatic linking to these libraries. And guess what? They're
>>>>pre-built and cannot be linked with other than the Microsoft tools.
>>>>AAAARRRGGGHHH!
>>>>
>>>>So, does anybody out there have any idea where I can pick up the
>>>>sources to these mystery libraries....

>> They've given you the IDL files .... these libraries are just


>>a bunch of IID defs which result from creating a static library from the
>>compiled x_i.c files generated by MIDL. lets face it, if you are
>>going to use Borland tools, you are going to need to be slightly clever.

>Ahh, it's starting to become clear. I'm very new to OLE programming,


>so I didn't know this fact. I'll try creating the .c files again from
>the MIDL compiler and see what pops out.

>> same for ATL, if you don't care to use the MFC ole implementation then


>>you're going to need to implement a few interfaces yourself...

>I'll cheat and use the BOCOLE classes. You're right about having to
>be a little bit clever: If I hadn't got this large OWL application I'd
>be using the Microsoft and MFC tools. That'll teach me to be an early
>adopter (well, nothing has so far so maybe it won't).

>>jon borden
>>JABR Technology
>>
>Many thanks,

>Simon Tuffs.

Andy Connors

unread,
May 11, 1996, 3:00:00 AM5/11/96
to

In article <01bb3a42.39b47180$32c2...@www.doubleplus.com>,
bra...@ix.netcom.com writes...

>
>
>On Saturday, May 04, 1996, P. Simon Tuffs wrote...
>> So, I download the ActiveX developer kit, and I'm trying to compile
>> the basic framework it in my Borland 5.0 compiler (yes, I don't use
>> the Microsoft tools). And after a mighty struggle I get through all
>> the compilation errors and Microsoft specific nastiers buried in the
>> code, and finally -- tada -- it doesn't link.
>>
>> Some clever *!@!* put #pragma comment(lib, "uuid.lib") and #pragma
>> comment(lib, "uuid3.lib") throughout the ActiveX SDK headers, to force
>> automatic linking to these libraries. And guess what? They're
>> pre-built and cannot be linked with other than the Microsoft tools.
>> AAAARRRGGGHHH!
>>
>> So, does anybody out there have any idea where I can pick up the
>> sources to these mystery libraries....
>>
>
>I'll bet you a dollar they're proprietary, and available only in
>object-code form.
>
>You *could* get the Microsoft Portable Executable / COFF specification
>from MSDN or Pietrek's "Windows 95 System Programming Secrets" and
>reverse-engineer Borland's format, then write your own linker. Probably
>make a bit of money off it too.
>
>Of course, you could also repaint your home and put in a new landscaping
>so that it would all blend in more aesthetically with your neighbors'
>property, but you probably don't want to do that either. Not even if they
>offered to pay you.
>--
>Bradd W. Szonye (bra...@ix.netcom.com), Doubleplus Corporation
>
>"To chill or to pop a cap in my dome, whoomp, there it is."
> -- Hamlet, Prince of Denmark
>

Hi,

I'm not sure about either MS's or Borland's formats, but Symantec has a utility
called coff2omf that converts COFF-format files to OMF format. If Borland uses
OMF, this might work.


Andy Connors


Pete Becker

unread,
May 11, 1996, 3:00:00 AM5/11/96
to

In article <4mimll$9...@nntp1.best.com>, java...@best.com says...

>
>Bradd W. Szonye <bra...@ix.netcom.com> wrote:
>
>>You *could* get the Microsoft Portable Executable / COFF specification
>>from MSDN or Pietrek's "Windows 95 System Programming Secrets" and
>>reverse-engineer Borland's format
>
>I don't think you'd need to reverse engineer it. I don't believe its
>proprietary; my understanding is that it simply doesn't use COFF, just
>some other (published) format -- I forget which one.

It's Intel/Microsoft OMF, just like MS tools used to do. With NT they switched
to COFF.


Jose' Bernardo Silva

unread,
May 13, 1996, 3:00:00 AM5/13/96
to

Steve Crook <Steve...@mtits.co.uk> wrote:

Yeah, me too. The word around where I work is that we will all be forced to
change from Borland's great tools, to M$ glitzy inoperative buggy crap. Some
of whatever stuff you're doing should probably ease the transition from
productivity to glamorous halt...

--
Microsoft Network is prohibited from redistributing this work in any
form, in whole or in part. Copyright, Jose' Bernardo Silva, 1996.
License to distribute this post is available to Microsoft for US$1,000,
or equivalent local currency. Posting without permission constitutes
an agreement to these terms. Please send notices of violation to
j...@smd.pt, j...@telepac.pt, and Postm...@microsoft.com

East Timor is not indoAMnesia!
Indonesians are killing innocent people in East Timor!

Michael A. Barnhart

unread,
May 15, 1996, 3:00:00 AM5/15/96
to

j...@smd.pt (Jose' Bernardo Silva) wrote:
>Yeah, me too. The word around where I work is that we will all be forced to
>change from Borland's great tools, to M$ glitzy inoperative buggy crap. >

Come on folks lets get honest. Yes MS has some bugs, but my first contact
with borland's compiler was not good either. Most of the samples would not
run with out editing. (Yes this was many years ago and I do not remember
the version). They all have good points.

--
Michael A. Barnhart
mab...@fastlane.net

Jose' Bernardo Silva

unread,
May 15, 1996, 3:00:00 AM5/15/96
to

"Michael A. Barnhart" <mab...@fastlane.net> wrote:

>Come on folks lets get honest. Yes MS has some bugs, but my first contact
>with borland's compiler was not good either. Most of the samples would not
>run with out editing. (Yes this was many years ago and I do not remember
>the version). They all have good points.

Well, Borland also has some bugs (it seems version 5 IDE has lots of them),
but VC/MFC is seriously lacking in what I need. When will it have a
TLayoutWindow equivalent? When will VC support RTTI? When will VC comply to
ANSI C++ specs?

I've tried both, and for me, VC/MFC are inferior tools, used only because M$
pushes them with its MSDN subscription.

Conrad Herrmann

unread,
May 15, 1996, 3:00:00 AM5/15/96
to si...@waveworks.com

P. Simon Tuffs wrote:
>
> jka...@opal.tufts.edu (Jonathan Borden) wrote:
>
> > to the original poster :

>
> > They've given you the IDL files .... these libraries are just
> >a bunch of IID defs which result from creating a static library from the
> >compiled x_i.c files generated by MIDL. lets face it, if you are
> >going to use Borland tools, you are going to need to be slightly clever.
>
> Well I grepped all of the files in the INETSDK, and none of the IDL
> files contain the missing interface definitions such as
> IID_IBindStatusCallback, nor apparently any of the functions also
> exported by uuid.lib. So I'm stuck.
>
> > same for ATL, if you don't care to use the MFC ole implementation then
> >you're going to need to implement a few interfaces yourself...
> Any hints as to any other non Microsoft/Non MFC frameworks to create
> OCX's or ActiveX's would be appreciated.
>
> HEY BORLAND, ARE YOU LISTENING?!!!
>
> Simon.
> I reported the bug about UUID3.LIB to Microsoft quite a while ago,
as well as a few other little niggly bugs in the ActiveX framework.
In the meantime, I hobbled together a replacement LIB that contains
the requisite guids and a list of instructions for what to do to the
framework to compile it with BC++.

What follows is a point-by-point description of how to use the
ActiveX Framework with Borland C++, that will also be appearing on
our web site and CompuServe sources soon. It's a rough first cut,
so don't flame me if there's a typo...

Have at it!
-- Conrad Herrmann
(Borland C+)

Using the Microsoft ActiveX Control Framework with Borland C++
==============================================================

Building the Base OLE Framework
-------------------------------

1. You can get the framework from the INETSDK in
\LATEST\INETSDK\SAMPLES\BASECTL\FRAMEWRK or
the MSDN \OLE\CONTROLS\FRAMEWRK. The one in the INETSDK is a bit
newer, but
they are nearly identical.

2. The differences between the two are very small.
INET2 adds: DIBCLS.CPP, and INTERNET.CPP.
INET2 changes: UTIL.C to add registry stuff and other utilities
CTLEMBED.CPP: for dynamic loading of
OleCreatePropertyFrame.

3. Here are the changes you need to apply to the framework to get it
to work with
BC++:
a. CTLHELP.CPP, line 35, where it says
static const GUID IID_IControlPrv =
Remove the "static" keyword. This variable will be used in
another .CPP file.

b. In INETSDK\INCLUDE\OAIDL.H, find the definition of tagVARIANT
and insert the
"#if !defined(__BORLANDC__)" tags illustrated below. While
this structure
has the ability to act like a standard ANSI C++ structure,
none of the example code
uses it that way, so the code won't compile if you turn on
ANSI standard headers
in Win32.

The "anti-ANSI" mode (MFC Compatibility) switch on the Borland
compiler
doesn't generate correct code for the nested
struct/union/struct/union, which
does not exist in released versions of OLE.


struct tagVARIANT
{
#if !defined(__BORLANDC__)
union
{
struct __tagVARIANT
{
#endif
VARTYPE vt;
WORD wReserved1;
WORD wReserved2;
WORD wReserved3;
union
{
LONG lVal;
BYTE bVal;
SHORT iVal;
FLOAT fltVal;
DOUBLE dblVal;
VARIANT_BOOL boolVal;
_VARIANT_BOOL _bool;
SCODE scode;
CY cyVal;
DATE date;
BSTR bstrVal;
IUnknown __RPC_FAR *punkVal;
IDispatch __RPC_FAR *pdispVal;
SAFEARRAY __RPC_FAR *parray;
BYTE __RPC_FAR *pbVal;
SHORT __RPC_FAR *piVal;
LONG __RPC_FAR *plVal;
FLOAT __RPC_FAR *pfltVal;
DOUBLE __RPC_FAR *pdblVal;
VARIANT_BOOL __RPC_FAR *pboolVal;
_VARIANT_BOOL __RPC_FAR *pbool;
SCODE __RPC_FAR *pscode;
CY __RPC_FAR *pcyVal;
DATE __RPC_FAR *pdate;
BSTR __RPC_FAR *pbstrVal;
IUnknown __RPC_FAR *__RPC_FAR *ppunkVal;
IDispatch __RPC_FAR *__RPC_FAR *ppdispVal;
SAFEARRAY __RPC_FAR *__RPC_FAR *pparray;
VARIANT __RPC_FAR *pvarVal;
PVOID byref;
CHAR cVal;
USHORT uiVal;
ULONG ulVal;
INT intVal;
UINT uintVal;
DECIMAL __RPC_FAR *pdecVal;
CHAR __RPC_FAR *pcVal;
USHORT __RPC_FAR *puiVal;
ULONG __RPC_FAR *pulVal;
INT __RPC_FAR *pintVal;
UINT __RPC_FAR *puintVal;
} __VARIANT_NAME_3;
#if !defined(__BORLANDC__)
} __VARIANT_NAME_2;
DECIMAL decVal;
} __VARIANT_NAME_1;
#endif
};

4. Make a project for FRAMEWRK.LIB in
\latest\inetsdk\samples\basectl\framewrk\framewrk.ide

- Set the project include path to
"..\include;..\..\..\include;c:\bc5\include"
- Turn off precompiled headers. They get huge since the source
wasn't optimized for using them.
- Set the librarian page size to 32.
- Set the default calling convention to __stdcall.
- Turn on MFC source compatibility.

- Put all the .CPP, and .C files in the FRAMEWRK directory into
the project.
- Set the translator attributes of both .C nodes to
"CPPCompile".
They are really C++ files, not C files.

5. Build All.
Now you have a .LIB file that can be included in an example OCX.


Building a Sample ActiveX Control
=================================

To build the WEBIMAGE example found in the INETSDK samples,

1. Make a project called WEBIMAGE.IDE in the
INETSDK\SAMPLES\BASECTL\WEBIMAGE directory.

Turn off precompiled headers.
Set the librarian page size to 32.
Set the default calling convention to __stdcall.
Turn on MFC source compatibility.

Put all the .CPP, .RC, and .DEF files in the WEBIMAGE directory
into the project.

2. Add URLMON.LIB and UUID3.LIB to your project.
- URLMON.LIB is an import library you will need to build from
\WINNT35\SYSTEM32\URLMON.DLL.
Use the command:
implib urlmon.lib urlmon.dll
to make the library.

- UUID3.LIB is a replacement for the GUIDs that Microsoft forgot
to include as source in the
ActiveX SDK. Save the attached file as UUID3.C and compile
and build it like this:

bcc32 -c -I\bc5\include uuid3.c
tlib uuid3.lib +uuid3.obj

3. Install a CompileODL tool like this:
Options|Tools...
Click New and enter:
Name: CompileODL
Path: c:\mstools\mktyplib.exe
Command Line: -o $NAME($SELNODES).LOG -DWIN32
-I..\include -I..\..\..\include -h $NAME($SELNODES)Interfaces.h -tlb
$NAME($SELNODES).TLB $SELNODES
Menu Text: Compile ODL
Help Hint: Make a typelib and interface header from an
ODL file

Clicked Advanced, and enter:
Tool Type: Translator
Tool Usage: Place On Speed Menu
Translate from: .ODL;
Default For: .ODL;
Translate To: .TLB

Click OK on all the dialogs.

4. Put WIMG.ODL in your project, before the .DLL file.
Set its translator to CompileODL.

5. Build All

6. Register the server with REGSVR32 WEBIMAGE.DLL.


Gotchas:
- If the OCX GPFs on startup, make sure you are using the BC5 OLE
headers, and not the INETSDK ones.
The INETSDK ones are

(C) 1996 Borland International, Inc.

File GUID3.C:
------------------------------------------------------cut
here---------------------
#pragma hdrstop

#define STRICT
#define INC_OLE2
#define INITGUID
#include <windows.h>

#ifndef _IFUNC
#define _IFUNC STDMETHODCALLTYPE
#endif

DEFINE_GUID( IID_IAsyncMoniker, 0x79EAC9D3, 0xBAF9, 0x11CE, 0x8C,
0x82, 0x00, 0xAA, 0x00, 0x4B, 0xA9, 0x0B) ;
DEFINE_GUID( IID_IServiceProvider, 0x6d5140c1, 0x7436, 0x11ce,
0x80, 0x34, 0x00, 0xaa, 0x00, 0x60, 0x09, 0xfa);
DEFINE_GUID( IID_IHlinkBrowseContext, 0x79eac9c7, 0xbaf9, 0x11ce,
0x8c, 0x82, 0x00, 0xaa, 0x00, 0x4b, 0xa9, 0x0b);
DEFINE_GUID( IID_IEnumHLITEM, 0x79eac9c6, 0xbaf9, 0x11ce, 0x8c,
0x82, 0x00, 0xaa, 0x00, 0x4b, 0xa9, 0x0b);
DEFINE_GUID( IID_IHlinkFrame, 0x79eac9c5, 0xbaf9, 0x11ce, 0x8c,
0x82, 0x00, 0xaa, 0x00, 0x4b, 0xa9, 0x0b);
DEFINE_GUID( IID_IHlinkTarget, 0x79eac9c4, 0xbaf9, 0x11ce, 0x8c,
0x82, 0x00, 0xaa, 0x00, 0x4b, 0xa9, 0x0b);
DEFINE_GUID( IID_IHlink, 0x79eac9c3, 0xbaf9, 0x11ce, 0x8c, 0x82,
0x00, 0xaa, 0x00, 0x4b, 0xa9, 0x0b);
DEFINE_GUID( IID_IHlinkSite, 0x79eac9c2, 0xbaf9, 0x11ce, 0x8c, 0x82,
0x00, 0xaa, 0x00, 0x4b, 0xa9, 0x0b);
DEFINE_GUID( IID_IOleCommandTarget, 0xb722bccb, 0x4e68, 0x101b,
0xa2, 0xbc, 0x00, 0xaa, 0x00, 0x40, 0x47, 0x70);
DEFINE_GUID( IID_IPrint, 0xb722bcc9, 0x4e68, 0x101b, 0xa2, 0xbc,
0x00, 0xaa, 0x00, 0x40, 0x47, 0x70);
DEFINE_GUID( IID_IContinueCallback, 0xb722bcca, 0x4e68, 0x101b,
0xa2, 0xbc, 0x00, 0xaa, 0x00, 0x40, 0x47, 0x70);
DEFINE_GUID( IID_IEnumOleDocumentViews, 0xb722bcc8, 0x4e68, 0x101b,
0xa2, 0xbc, 0x00, 0xaa, 0x00, 0x40, 0x47, 0x70);
DEFINE_GUID( IID_IOleDocumentView, 0xb722bcc6, 0x4e68, 0x101b, 0xa2,
0xbc, 0x00, 0xaa, 0x00, 0x40, 0x47, 0x70);
DEFINE_GUID( IID_IOleDocumentSite, 0xb722bcc7, 0x4e68, 0x101b, 0xa2,
0xbc, 0x00, 0xaa, 0x00, 0x40, 0x47, 0x70);
DEFINE_GUID( IID_IOleDocument, 0xb722bcc5, 0x4e68, 0x101b, 0xa2,
0xbc, 0x00, 0xaa, 0x00, 0x40, 0x47, 0x70);
DEFINE_GUID( IID_IProvideClassInfo3, 0xfc4801a2, 0x2ba9, 0x11cf,
0xa2, 0x29, 0x00, 0xaa, 0x00, 0x3d, 0x73, 0x52);
DEFINE_GUID( IID_IDataPathBrowser, 0xfc4801a4, 0x2ba9, 0x11cf, 0xa2,
0x29, 0x00, 0xaa, 0x00, 0x3d, 0x73, 0x52);
DEFINE_GUID( IID_IObjectWithSite, 0xfc4801a3, 0x2ba9, 0x11cf, 0xa2,
0x29, 0x00, 0xaa, 0x00, 0x3d, 0x73, 0x52);
DEFINE_GUID( IID_IBindHost, 0xfc4801a0, 0x2ba9, 0x11cf, 0xa2, 0x29,
0x00, 0xaa, 0x00, 0x3d, 0x73, 0x52);
DEFINE_GUID( IID_ICatInformation, 0x0002E013, 0x0000, 0x0000, 0xc0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46);
DEFINE_GUID( IID_ICatRegister, 0x0002E012, 0x0000, 0x0000, 0xc0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46);
DEFINE_GUID( IID_IEnumCATEGORYINFO, 0x0002E011, 0x0000, 0x0000,
0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46);
DEFINE_GUID( IID_IEnumGUID, 0x0002E000, 0x0000, 0x0000, 0xc0, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x46);
DEFINE_GUID( IID_IHttpNegotiate, 0x79EAC9D2 , 0xBAF9 , 0x11CE,
0x82, 0x8C, 0x00, 0xAA, 0x00, 0x4B, 0xA9, 0x0B );
DEFINE_GUID( IID_ICodeInstall, 0x79EAC9D1 , 0xBAF9 , 0x11CE,
0x82, 0x8C, 0x00, 0xAA, 0x00, 0x4B, 0xA9, 0x0B );
DEFINE_GUID( IID_IAuthenticate, 0x79EAC9D0 , 0xBAF9 , 0x11CE,
0x82, 0x8C, 0x00, 0xAA, 0x00, 0x4B, 0xA9, 0x0B );
DEFINE_GUID( IID_IBindStatusCallback, 0x79EAC9C1 , 0xBAF9 , 0x11CE,
0x82, 0x8C, 0x00, 0xAA, 0x00, 0x4B, 0xA9, 0x0B );
DEFINE_GUID( IID_IBinding, 0x79EAC9C0 , 0xBAF9 , 0x11CE,
0x82, 0x8C, 0x00, 0xAA, 0x00, 0x4B, 0xA9, 0x0B );
DEFINE_GUID( IID_IBindProtocol, 0x79EAC9CD , 0xBAF9 , 0x11CE,
0x82, 0x8C, 0x00, 0xAA, 0x00, 0x4B, 0xA9, 0x0B );
DEFINE_GUID( IID_IPersistMoniker, 0x79EAC9C9 , 0xBAF9 , 0x11CE,
0x82, 0x8C, 0x00, 0xAA, 0x00, 0x4B, 0xA9, 0x0B );

//(C) 1996 Borland International, Inc.

Chris Marriott

unread,
May 15, 1996, 3:00:00 AM5/15/96
to

In article <3199e235.1009411@smdsa>, Jose' Bernardo Silva <j...@smd.pt>
writes

>When will VC support RTTI?

It does already.

> When will VC comply to
>ANSI C++ specs?

Again, it does now.

I'm sorry, but I find it very difficult to take seriously any comment
from someone with a "Microsoft must pay me" sig. That fact alone
indicates your biased opinions.

Chris

--------------------------------------------------------------------------
Chris Marriott, Warrington, UK | Author of SkyMap v3 award-winning
ch...@chrism.demon.co.uk | shareware Win31/Win95 planetarium.
For full info, see http://www.execpc.com/~skymap
Author member of Association of Shareware Professionals (ASP)
--------------------------------------------------------------------------


Michaeljon Miller

unread,
May 17, 1996, 3:00:00 AM5/17/96
to

There's only a few problems with this, otherwise it's great.


On Wednesday, May 15, 1996, Conrad Herrmann wrote...


> What follows is a point-by-point description of how to use the
> ActiveX Framework with Borland C++, that will also be appearing on
> our web site and CompuServe sources soon. It's a rough first cut,
> so don't flame me if there's a typo...
>
> Have at it!
> -- Conrad Herrmann
> (Borland C+)

> 3. Install a CompileODL tool like this:
> Options|Tools...
> Click New and enter:
> Name: CompileODL
> Path: c:\mstools\mktyplib.exe

mktyplib wants to run CL.EXE as the preprocessor and wants the output sent
to stdout. It also hands several command-line options to the
preprocessor. CPP.EXE doesn't cope well with either. Might as well keep
a copy of MSVC around or get a preprocessor that does the above.

> Command Line: -o $NAME($SELNODES).LOG -DWIN32
> -I..\include -I..\..\..\include -h $NAME($SELNODES)Interfaces.h -tlb
> $NAME($SELNODES).TLB $SELNODES
> Menu Text: Compile ODL
> Help Hint: Make a typelib and interface header from an
> ODL file
>
>

> 5. Build All
>
> 6. Register the server with REGSVR32 WEBIMAGE.DLL.
>

The controls fail to register. The source uses GetModuleName with
g_hInstance, which only gets set in DllMain. DllMain *never* gets called,
so I replaced it with DllEntryPoint (and explicitly exported it) and that
never gets called either. So, GetModuleName is returning REGSVR32.EXE and
there's no type library information for GetTypeLibrary to read.

Any help on these issues?

Mj

Conrad Herrmann

unread,
May 21, 1996, 3:00:00 AM5/21/96
to Michaeljon Miller

Michaeljon Miller wrote:
>
> There's only a few problems with this, otherwise it's great.
>
> On Wednesday, May 15, 1996, Conrad Herrmann wrote...
> > What follows is a point-by-point description of how to use the
> > ActiveX Framework with Borland C++, that will also be appearing on
> > our web site and CompuServe sources soon. It's a rough first cut,
> > so don't flame me if there's a typo...
> >
> > Have at it!
> > -- Conrad Herrmann
> > (Borland C+)
> > 3. Install a CompileODL tool like this:
> > Options|Tools...
> > Click New and enter:
> > Name: CompileODL
> > Path: c:\mstools\mktyplib.exe
>
> mktyplib wants to run CL.EXE as the preprocessor and wants the output sent
> to stdout. It also hands several command-line options to the
> preprocessor. CPP.EXE doesn't cope well with either. Might as well keep
> a copy of MSVC around or get a preprocessor that does the above.
>
> > Command Line: -o $NAME($SELNODES).LOG -DWIN32
> > -I..\include -I..\..\..\include -h $NAME($SELNODES)Interfaces.h -tlb
> > $NAME($SELNODES).TLB $SELNODES
> > Menu Text: Compile ODL
> > Help Hint: Make a typelib and interface header from an
> > ODL file
> >
> >
> > 5. Build All
> >
> > 6. Register the server with REGSVR32 WEBIMAGE.DLL.
> >
>
> The controls fail to register. The source uses GetModuleName with
> g_hInstance, which only gets set in DllMain. DllMain *never* gets called,
> so I replaced it with DllEntryPoint (and explicitly exported it) and that
> never gets called either. So, GetModuleName is returning REGSVR32.EXE and
> there's no type library information for GetTypeLibrary to read.
>
> Any help on these issues?
>
> Mj


Ah, right. I forgot to put that in the docs.
I apparently used CL.EXE, too. One thing that I did get to work
is to preprocess the file by hand, then use the /nocpp option on
mktyplib to make it not run any preprocessor.
For example,
\bc5\bin\cpp -D__MKTYPLIB__ -P- -owimg.odx -I..\include
-I\inetsdk\include -I\bc5\include wimg.odl
\mstools\bin\mktyplib -DWIN32 -I..\include
-I\inetsdk\include -I\bc5\include -h wimginterfaces.h -tlb
wimg.tlb -nocpp wimg.odx

The second problem is that you need to change the name of
DllMain to DllEntryPoint, and make sure it is extern "C", as in:

extern "C" BOOL WINAPI DllEntryPoint
(
HANDLE hInstance,
DWORD dwReason,
void *pvReserved
)

DllEntryPoint does not have to be exported, since it is called
by the RTL, and not by the calling EXE.

Thanks for pointing out the mistakes; I'll incorporate the
changes into the official document.
-- Conrad

Todd Bandrowsky

unread,
Aug 9, 1996, 3:00:00 AM8/9/96
to

It is ironic that Java, a Sun language, is right now the most effective
tool for working with OLE / COM. If Microsoft polishes J++ a bit more, and
adds a few more features, I think C++ will be pretty much history.
0 new messages