Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Does anyone know how to write a .com project in VB6?

Status
Not open for further replies.

TeaAddictedGeek

Programmer
Apr 23, 1999
271
0
0
US
'Cause it's the only way I know to actually get a CF application to read it....<br>
<br>
<br>

 
Kyrene -<br>
<br>
.com files are ancient -- back from the MS-DOS 3.x days. The .com extension means that the program was written to the 'small' model, and has only one 16k data segment and one 16k code segment. No one other than the embedded systems guys have used them in 10 years.<br>
<br>
Are you sure that's what the Cold Fusion docs say they'll run? Seems strange.... What happens if you rename your .exe program to .com? I suspect the operating system will choke, but it might be interesting to see what happens.<br>
<br>
Chip H.<br>

 
chiph,<br>
<br>
Think the 'com' referenece here is to the Component Object Model, not the small memory C compilation method.<br>
<br>
However, I don't know enough to write _either_ variety &lt;grin!&gt;.<br>
<br>
Kyrene,<br>
<br>
If you have MSDN access, there was a sample/tutorial/example/whatever of using VB to create a COM object on the MSDN site - may be in the CDs, too, haven't looked there for it.<br>
<br>
Make a good day . . .<br>
. . . barn<br>

 
Kyrene,<br>
<br>
We've been developing apps with COM structure since VB4.<br>
<br>
MSDN subscription is a must. A good book is Doing Objects in VB6 by Deborah Karata by Miscrosof Press. MSDN site has Duwamish Books sample app, among others.<br>
<br>
COM and DCOM and more are all rolled into COM+ in WIN2000. In my opinion, WIN2000 will be where distributed architecture will really take off. Many, many benefits. At this time many, many headaches. Much pain, much gain.<br>
<br>
John
 
:) The reason why I'm asking is because of the Cold Fusion tag CFOBJECT, which can call com and dcom applications.... I was wondering if I could use that to call a VB program.<br>

 
Hi Kyrene!<br>
<br>
OK, I misunderstood the question -- that 'dot' in '.com' threw me off! Too many things, not enough names for them all.<br>
<br>
Simply put, VB has had the ability to create COM objects since version 4. What you do is create a Active-X DLL project, add a class module, and then set the instancing properties for the class as a whole to "5 - Multiuse". Any methods (properties, functions, subroutines) and variables that you declare as "public" in this class become visible to other programs, and available for their use.<br>
<br>
So, if CF has the ability to call COM and DCOM objects, then there shouldn't be any problems calling a COM object written in VB. One catch, is if you distribute your VB COM object, you also have to distribute the VB runtime.<br>
<br>
Chip H.<br>

 
Good luck and let us know how you get on.<br>
<br>
Mike<br>
---<br>
Mike_Lacey@Cargill.Com<br>

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top