Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8132651
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T09:23:49+00:00 2026-06-06T09:23:49+00:00

With CreateProcessAsUser I can call an .exe file somewhere on the hard disk: CreateProcessAsUser(IntPtr

  • 0

With CreateProcessAsUser I can call an .exe file somewhere on the hard disk:

CreateProcessAsUser(IntPtr hToken, string lpApplicationName, string lpCommandLine,
                      ref SECURITY_ATTRIBUTES lpProcessAttributes, ref SECURITY_ATTRIBUTES lpThreadAttributes,
                      bool bInheritHandle, Int32 dwCreationFlags, IntPtr lpEnvrionment,
                      string lpCurrentDirectory, ref STARTUPINFO lpStartupInfo,
                      ref PROCESS_INFORMATION lpProcessInformation);

Each single example I have found in the web uses the lpCommandLine argument to call a program.
I would like to call a function in a dll.
Does anyone know if this is possible? Would be nice to have kind of an example …

Thank you!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T09:23:50+00:00Added an answer on June 6, 2026 at 9:23 am

    You can’t directly call a DLL as a different user as the user/execution level is per process, not DLL or thread. You must start a new process that then calls the DLL. This is the technique used by
    COM elevation, etc. If the DLL has the right signature, you can try calling it with rundll32.exe.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using CreateProcessAsUser from a windows service ( please can we stay on-topic
I've read all the posts on Stack Overflow about CreateProcessAsUser and there are very
i'm using CreateProcessAsUser in c# to launch a process by a service my service
How to trick UAC in Vista and Windows 7? How can I run something
Does anyone have an example of how to use CreateProcessAsUser in Delphi? I'm using
Happening in Windows 7: I have installed process proc1.exe as service.In the proc1, i
Most sample code on the web for calling CreateProcessAsUser() has a similar PInvoke signature
Using my own program or others I can't get winsock to run when calling
I'm calling CreateProcess to launch cl.exe (VS2010 on Win7 64 bit). I get the
Calling a GUI app using [DllImport( advapi32.dll, EntryPoint = CreateProcessAsUser, SetLastError = true, CharSet

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.