Results 1 to 8 of 8

Thread: How to creat my own .OLB file?

  1. #1

    Thread Starter
    Hyperactive Member brenaaro's Avatar
    Join Date
    Sep 2001
    Location
    Montreal, Canada
    Posts
    391

    How to creat my own .OLB file?

    Can anyone point me to any tips/tutorials/etc that I would need to create my own .OLB file for a VB application? I don't even know what language I would use to write it, though I'm guessing C++...
    And I, for one, welcome our new insect overlords. I'd like to remind them as a trusted TV personality, I can be helpful in rounding up others to toil in their underground sugar caves.

  2. #2
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    Is OLB some kind of type library?
    Those would be written in IDL or ODL. (Interface/Object Definitions Language)
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  3. #3
    Frenzied Member
    Join Date
    Jul 2002
    Posts
    1,370
    Maybe he means an object library. like .so or .lib ?
    I don't know about .OLB files except on VAX systems.

  4. #4

    Thread Starter
    Hyperactive Member brenaaro's Avatar
    Join Date
    Sep 2001
    Location
    Montreal, Canada
    Posts
    391
    Yes it's apparently a type library.

    From MSDN I get:

    type library

    A file or component within another file that contains standard descriptions of exposed objects, properties, and methods that are available for Automation. Object library files (.olb) contain type libraries.


    I'm trying to build one so I can pass a user-defined type from my VB app to an ActiveX dll. I'm assuming that by referencing an object library in both my app and the dll, I won't have a problem.

    So about IDL/ODL. What would I use to program/compile it?
    And I, for one, welcome our new insect overlords. I'd like to remind them as a trusted TV personality, I can be helpful in rounding up others to toil in their underground sugar caves.

  5. #5
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    ActiveX DLLs usually have big problems with user-defined types. All parameters to ActiveX are VARIANTs, so they can't contain UDTs.

    You write IDL (ODL was replaced by IDL) the same way as any other language: in a text editor. I think VC++ supports syntax highlighting for IDL. You compile it using the MIDL compiler (comes with the platform SDK), it creates a set of C files and headers + a type library.
    It might not be easy to replace a given type library. You need to know several inside things about the DLL (such as vtable order, internal objects, dual interface or no, all of them things you would normally not know).
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  6. #6

    Thread Starter
    Hyperactive Member brenaaro's Avatar
    Join Date
    Sep 2001
    Location
    Montreal, Canada
    Posts
    391
    Hmm , that is true. I do not know that yet. I guess I'll try to find some sort of work around for now.

    Thanks for the feedback.
    And I, for one, welcome our new insect overlords. I'd like to remind them as a trusted TV personality, I can be helpful in rounding up others to toil in their underground sugar caves.

  7. #7
    Frenzied Member
    Join Date
    Jul 2002
    Posts
    1,370
    What are you trying to accomplish?

  8. #8

    Thread Starter
    Hyperactive Member brenaaro's Avatar
    Join Date
    Sep 2001
    Location
    Montreal, Canada
    Posts
    391
    Well, it's kind of strange.

    Several months ago I had created an ActiveX dll, and declared a public user-defined-type in the main class module. But when I wanted my application to pass an object of that UDT to a public function in the DLL, it would not let me.

    Now however, I am doing the same thing with a different dll and different application..and it's working.

    I had thought it wouldnt work which was why I started this thread..but I just tried it 10 minutes ago and it seems to be working ok (so far)..I must have done something differently now than then..though I'm not sure what that might be..yet.
    And I, for one, welcome our new insect overlords. I'd like to remind them as a trusted TV personality, I can be helpful in rounding up others to toil in their underground sugar caves.

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