CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Page 1 of 2 12 LastLast
Results 1 to 15 of 20
  1. #1
    Join Date
    Feb 2009
    Posts
    19

    COM server exe import

    Hi all.. Im importing COM server exe which on the remote machine in my client program..But I'm not able to import..I'm getting fatal error C1083: Cannot open type library file: '\\remotemachinename\FileServer.exe':
    This is the import statement:
    #import "\\remotemachinename\FileServer.exe"
    using namespace FILESERVERLib;


    Thank u...

  2. #2
    Join Date
    Feb 2005
    Location
    Pune (India)
    Posts
    644

    Thumbs up Re: COM server exe import

    hi,

    is it working on same machin ???


    -Anant
    "Devise the simplest possible solution that solves the problems"

  3. #3
    Join Date
    Feb 2009
    Posts
    19

    Re: COM server exe import

    Yes its working on the same machine..

  4. #4
    Join Date
    Feb 2009
    Posts
    19

    Re: COM server exe import

    Actually I do not know what kind of import statement I should specify...

    Thank u..

  5. #5
    Join Date
    Feb 2005
    Location
    Pune (India)
    Posts
    644

    Thumbs up Re: COM server exe import

    Hi,


    check the section "Search Order for filename" in
    http://msdn.microsoft.com/en-us/libr...b6(VS.71).aspx


    -Anant
    "Devise the simplest possible solution that solves the problems"

  6. #6
    Join Date
    Feb 2009
    Posts
    19

    Smile Re: COM server exe import

    Thank u...I ll go through and let u know...

  7. #7
    Join Date
    Feb 2009
    Posts
    19

    Re: COM server exe import

    I have a doudt.. Does importing a tlb file and an exe file differ? Any way the client needs the the location of the COM exe for requesting the interface.. Whats wrong with my import statement ?

  8. #8
    Join Date
    Feb 2005
    Location
    Pune (India)
    Posts
    644

    Thumbs up Re: COM server exe import

    Hi,


    might be there is any issue with the path specified.. !

    -Anant
    "Devise the simplest possible solution that solves the problems"

  9. #9
    Join Date
    Feb 2009
    Posts
    19

    Lightbulb Re: COM server exe import

    Hi.. Can u please help to resolve my problem....

    Thank u..

  10. #10
    Join Date
    Nov 2000
    Location
    Voronezh, Russia
    Posts
    6,633

    Re: COM server exe import

    Quote Originally Posted by Revti View Post
    I have a doudt.. Does importing a tlb file and an exe file differ? Any way the client needs the the location of the COM exe for requesting the interface.. Whats wrong with my import statement ?
    I'm not quite sure, but think the network path for COM server is not good. I never met some explicit instruction that the thing is forbidden, but my impression always was that any kind of COM server must be located locally, unless it's DCOM server (which is totally different story).

    BTW, what is your exact intention for having the server's .exe remote?
    Best regards,
    Igor

  11. #11
    Join Date
    Feb 2009
    Posts
    19

    Unhappy Re: COM server exe import

    Actually thats my project... I have been asked to test my COM on a remote machine and to find the solution if network is down or the process itself crashes things like that... But, my initial step itself doesn't work and could'nt proceed further ...First I must try to connect the COM on the remote machine..Do u have any idea like how to do?
    Thank u...

  12. #12
    Join Date
    Feb 2009
    Posts
    19

    Re: COM server exe import

    Its something similar to DCOM ....

  13. #13
    Join Date
    Nov 2000
    Location
    Voronezh, Russia
    Posts
    6,633

    Re: COM server exe import

    It can't be "something similar", it's either DCOM or not.
    In case it's DCOM, an appropriate COM/RPC error must be produced in case of network failure.

    FYI: I have placed one of my own out-of-proc COM servers onto network share and compiled my .cpp with #import "" instruction pointed to the server. It has been compiled with no problem.
    Best regards,
    Igor

  14. #14
    Join Date
    Nov 2000
    Location
    Voronezh, Russia
    Posts
    6,633

    Re: COM server exe import

    Quote Originally Posted by Revti View Post
    Hi all.. Im importing COM server exe which on the remote machine in my client program..But I'm not able to import..I'm getting fatal error C1083: Cannot open type library file: '\\remotemachinename\FileServer.exe'
    Actually, the path '\\remotemachinename\FileServer.exe' is something weird in terms of networking. UNC path (which ) is build of following components:

    \\server_name\share_name\rel_path

    So your path just points to FileServer.exe share on remotemachinename host (and therefore, contains no relative path to a COM server or type library that could be imported). I doubt this is what you had in mind.
    Best regards,
    Igor

  15. #15
    Join Date
    Feb 2009
    Posts
    19

    Re: COM server exe import

    Thank u.. But its not the share on remote machine..Through my code i should be able to call a process running on the remote machine...how can i do that?.. Should I have to build proxy/stub ?
    Thank u..

Page 1 of 2 12 LastLast

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

Featured