DLL Problem - Page 2
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Page 2 of 2 FirstFirst 12
Results 16 to 22 of 22

Thread: DLL Problem

  1. #16
    Join Date
    May 1999
    Location
    Southern California
    Posts
    12,266
    It usually does not work to try to get around MFC and the ClassWizard and such if you are guessing at what needs to be done. I doubt that inserting a TYPELIB statement in that manner will work. We seldom need to modify the rc file directly ourselves. It is not likely to work; probably the TYPELIB statement will be deleted again as soon as you modify the resources using the resource editor.
    Last edited by Sam Hobbs; March 6th, 2004 at 07:33 PM.
    "Signature":
    My web site is Simple Samples.
    C# Corner Editor

  2. #17
    Join Date
    Dec 2003
    Location
    Simi Valley, CA
    Posts
    24
    You're right it does take it out again
    Is it a setup in the Project to tell it to link to the .tlb file?

  3. #18
    Join Date
    May 1999
    Location
    Southern California
    Posts
    12,266
    Have you used the AutoClik tutorial? It is in the MFC tutorials; look in your copy of the VC documentatio for the Visual C++ Tutorials (Visual C++ Tutorials) page; you will see the Autoclik: Automation tutorial listed there. I think that if you use that tutorial, you won't flounder as much.

    When you create the (CMessageCenter) class for your Automation object, what do you derive from? It has been a while since I did any Automation server development myself so I forget the details. I should go through the Autoclik tutorial too.
    "Signature":
    My web site is Simple Samples.
    C# Corner Editor

  4. #19
    Join Date
    Dec 2003
    Location
    Simi Valley, CA
    Posts
    24
    Thanks I will look at that.

    I derived my automation class from CWnd. I did this because I wanted to add a tray icon.

    John

  5. #20
    Join Date
    May 1999
    Location
    Southern California
    Posts
    12,266
    CWnd is not likely to work. CWnd is difficult to use unless it is a child of another window. If you make your object derived from a window object, then you probably need to create a class derived from CFrameWnd and then use the derived class for your Automation object. However I think that would be a mistake too.

    Probably the Automation object should be drived from a non-window class. You can still create a window in the Automation server, and methods and properties can be provided to control the winow, but my guess is that the object itself should not be derived from CWnd or any class derived from CWnd.

    However if there is anything anywhere saying that using CWnd for your Automation object will work, then I am probably wrong.
    "Signature":
    My web site is Simple Samples.
    C# Corner Editor

  6. #21
    Join Date
    May 1999
    Location
    Southern California
    Posts
    12,266
    In the AutoClik tutorial is ODL File for Creating a Type Library. It says that the odl gets compiled to a tlb; it does not say anything about the type library being put into the resources. I think that putting the type library into the resources is an additional step but I don't know what that is.

    Also, the AutoClik Automation object is a CDocument-derived class, correct? Of course, a DLL Automation server does not have a document (initially) but I make that point just to show that it is probably not normal to use a dialog or other window for the object.
    Last edited by Sam Hobbs; March 6th, 2004 at 03:57 PM.
    "Signature":
    My web site is Simple Samples.
    C# Corner Editor

  7. #22
    Join Date
    Dec 2003
    Location
    Simi Valley, CA
    Posts
    24
    Thanks for your help Sam.
    I just finished the tutorial and I'm about to start some different approaches for my automation control.
    I'll let you know what happens

    (I live of Sycamore and Royal, I got confused with the Knolls, I thought it was the Knolls appartment complex in TO of Av. De Los Arboles. I used to live right accross the street from that.)

Page 2 of 2 FirstFirst 12

Posting Permissions

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


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center