- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
所以我一直在开发一个小应用程序,它在某些时候以另一个用户的身份运行一个应用程序,我用 C 编写它并使用 MinGW GCC 编译器来编译和链接它。我的问题是,每当我尝试使用 WINAPI 函数 CreateProcessWithLogonW() 时,我都会收到一条错误消息,提示“未定义对 CreateProcessWithLogonW() 的引用。”
尽管我这样编译时链接了 Advapi32,
gcc file.c -lAdvApi32 -o filename
最佳答案
正确的解决方案实际上是 #include 正确的 mingw32 header :即
#include <windows.h>
尽管 Anthales 提出的解决方案有效,但它的扩展性不佳。
关于c - 对 CreateProcessWithLogonW 的 undefined reference ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9889675/
我需要从 Windows 服务运行命令行应用程序,以另一个 Windows 用户身份执行它(通过提供域\用户 和密码)。 我以这种方式将 Windows API CreateProcessWithLo
我正在尝试启动一个程序,该程序以另一个用户的身份在 Windows 7 系统上使用 Win32 函数 CreateProcessWithLogon 启动另一个程序,但它返回错误 120,表示不支持的函
我有一个 Windows 服务(在 WinXP SP2 下),在 LocalSystem 帐户下运行,它使用 CreateProcessWithLogonW 启动进程。为了清理子进程,我尝试使用作业对
我正在使用来自 http://www.pinvoke.net/default.aspx/advapi32.createprocesswithlogonw 的代码.如何从标准输出中获取字符串形式的输出?
我有一段代码 if(!CreateProcessWithLogonW( szUserName, NULL, szPassword, LOGON_WITH_PROFILE
在测试框架中,进程 A 必须使用 CreateProcessWithLogonW API 在不同的用户凭据(例如,_limited_user)下启动进程 B。 lpStartupInfo->lpDes
我有一个 Windows 可执行文件,它是通过使用一组指定的用户详细信息调用 CreateProcessWithLogonW() 从服务中启动的。 这工作正常,并且该过程按预期开始。但是,当此进程尝试
大家好,我是编程新手。请有人帮助我。 我正在尝试从服务启动进程。我需要通过提示用户输入管理员凭据来启动新流程。 我正在尝试使用 CreateProcessWithLogonW()。 我使用的功能是否正
我写了一个程序,它应该像 RunAs 一样工作。它工作正常,但我有一个问题。如果我想运行例如 compmgmt.msc,那么我应该运行 mmc.exe 和 compmgmt.msc 作为它的参数。计算
我写了一个小函数,可以加载一个的多个实例使用 CreateProcessWithLogonW 可执行 伪代码: for ( i=0;i<100;i++) { sprintf(user,"user%
当我使用 CreateProcess() 创建一个进程时,我可以毫无问题地从它的 stdOut 中读取。为此,我创建了管道并通过 STARTUPINFO 将它们传递给进程。稍后我可以使用 ReadFi
所以我一直在开发一个小应用程序,它在某些时候以另一个用户的身份运行一个应用程序,我用 C 编写它并使用 MinGW GCC 编译器来编译和链接它。我的问题是,每当我尝试使用 WINAPI 函数 Cre
我正在使用以下代码创建具有其他用户安全权限的进程: CreateProcessWithLogonW( Username, Domain ? Domain : L".", Pas
我是一名优秀的程序员,十分优秀!