Results 1 to 5 of 5

Thread: Com / Dcom

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2004
    Posts
    3

    Com / Dcom

    Hi friends,

    many greetings,

    I want to know how to implement early binding and late binding while creating a com object.

    I also want to know array starting element is zero but i want to start array from 4 number element.

    I want to know how to create a n number parameters function.

    I want to know the details for creating COM component and how to use it.

    Regards
    Harish

  2. #2
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709
    Wouldn't it be the same as when you early/late bind in a
    standard exe?

    VB Code:
    1. Dim oRS As Object 'Late binding
    2. Dim oRS as ADODB.Recordset 'Early binding
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  3. #3
    PowerPoster Dave Sell's Avatar
    Join Date
    Mar 2004
    Location
    /dev/null
    Posts
    2,961

    Re: Com / Dcom

    Originally posted by harishpatel
    I want to know the details for creating COM component and how to use it.
    This question gets asked alot here, and gets just as few good answers. Why? It's like asking for help building your own city from scratch (Insert Sim-joke here). There is alot of information out there, but the topic is large, and hard to understand, and frankly becoming legacy.

    I recommend getting several books on the topic and put your nose to the grindstone; you've got a lot of work ahead. Better get crackin!

  4. #4

  5. #5
    PowerPoster
    Join Date
    Feb 2001
    Location
    Crossroads
    Posts
    3,046

    Re: Com / Dcom

    Originally posted by harishpatel
    I want to know how to implement early binding
    'Early binding using Excel for example
    'Set a reference to Excel using Project-References menu options in VB IDE then:
    Dim objExcel as New Excel.Application

    'or you can:

    Dim objExcel as Excel.Application
    Set objExcel = New Excel.Application
    Originally posted by harishpatel
    and late binding while creating a com object.
    'Late Binding with Excel for example (no need to set Reference with menu options for Late Binding)

    Dim objExcel as Object
    Set objExcel = CreateObject("Excel.Application")

    Originally posted by harishpatel

    I also want to know array starting element is zero but i want to start array from 4 number element.
    'To make this the default for everything with an element you can
    Option Base 4
    'Or you can do it as you Dim
    Dim myArray(4 to 100) as Integer
    Originally posted by harishpatel

    I want to know how to create a n number parameters function.
    Private Function myFunction(one as integer, two as double, ... , n as Long) As Double
    'Code here
    end Function
    Originally posted by harishpatel

    I want to know the details for creating COM component and how to use it.
    When starting a project in VB6, select ActiveX exe or ActiveX DLL instead of EXE. Access and use the compiled project (dll or exe) using early or late binding
    Last edited by Muddy; Sep 12th, 2004 at 09:46 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width