CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7
  1. #1
    Join Date
    Jul 2003
    Location
    Munich, Germany
    Posts
    51

    VB6 on Win 7 and access to Outlook

    Hi,

    I have installed VB6 SP6 on my Win 7 64 bit. With settings compatability to 'WinXP SP3 ' for the VB6 exe it work fine.
    However, my VB6 program does access the Outlook data (via the Outlook COM Obect).
    But as vb6.exe must be started as Admin or in WinXP compatability mode, it seems that vb6 has another contect than Outlook was started in: it does not see any Outlook data.
    I have to start Outlook as administrator as well. Then my application I am debugging in VB6 has access to the Outlook data.

    Summary:
    vb6.exe and Ootlook.exe with admin privileges : OK
    vb6.exe with admin privileges and Ootlook.exe as normal user :NOT OK
    It seems that in the 2nd case vb6 and Outlook run in a different context. Can that be the case?

    But I do not want to start Oulook with admin privileges.


    Any Idea?

  2. #2
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: VB6 on Win 7 and access to Outlook

    Yes. Administrator doesn't have admin privileges (by default!).
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  3. #3
    Join Date
    Jul 2003
    Location
    Munich, Germany
    Posts
    51

    Re: VB6 on Win 7 and access to Outlook

    Quote Originally Posted by dglienna View Post
    Yes. Administrator doesn't have admin privileges (by default!).
    Thanks, But what does this mean or how does this help me???

  4. #4
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: VB6 on Win 7 and access to Outlook

    It means if your program requires elevation, then you have no choice. (You can invoke user, in .Net to some degree, but not VB6)
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  5. #5
    Join Date
    Jul 2003
    Location
    Munich, Germany
    Posts
    51

    Re: VB6 on Win 7 and access to Outlook

    but why does a program startet with admin privileges have no access to a COM object to a program started as normal user?
    I thought a program with higher privileges should get access to a program with lower privileges.

    Or is this a problem of the user context?

  6. #6
    Join Date
    Jun 2004
    Location
    NH
    Posts
    678

    Re: VB6 on Win 7 and access to Outlook

    Are we talking an administrator in the administrators group(split-token)?

    Or, are we talking about the true built in "Administrator"(full-token)?
    __

    The user context, can cause the program to run and save files to the administrators profile, ie taskbar, startmenu, etc.
    It depends on the application, usually the larger the app, the greater the chance it will be written in a way that causes it to save directly in the users context.

    So I can see this as a possible cause.

  7. #7
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: VB6 on Win 7 and access to Outlook

    Most anything that runs on Vista can be traced back to permission problems, but we haven't seen any of your code.
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

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