简单问题

liunini 2003-08-25 09:33:11
RegisterServiceProcess和 GetCurrentProcess在那个dll中
告知,最好写出函数原形
...全文
23 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
chinasg 2003-08-25
  • 打赏
  • 举报
回复
GetCurrentProcess 从kernel32中来的,自己查一下API就可以找到。


he GetCurrentProcess function returns a pseudohandle for the current process.

HANDLE GetCurrentProcess(VOID)


Parameters

This function has no parameters.

Return Values

The return value is a pseudohandle to the current process.

Remarks

A pseudohandle is a special constant that is interpreted as the current process handle. The calling process can use this handle to specify its own process whenever a process handle is required. Pseudohandles are not inherited by child processes.
This handle has the maximum possible access to the process object. For systems that support security descriptors, this is the maximum access allowed by the security descriptor for the calling process. For systems that do not support security descriptors, this is PROCESS_ALL_ACCESS. For more information, see Process Objects.

A process can create a "real" handle to itself that is valid in the context of other processes, or that can be inherited by other processes, by specifying the pseudohandle as the source handle in a call to the DuplicateHandle function. A process can also use the OpenProcess function to open a real handle to itself.
The pseudohandle need not be closed when it is no longer needed. Calling the CloseHandle function with a pseudohandle has no effect. If the pseudohandle is duplicated by DuplicateHandle, the duplicate handle must be closed.






RegisterServiceProcess :

The RegisterServiceProcess function registers or unregisters a service process. A service process continues to run after the user logs off.

DWORD RegisterServiceProcess(DWORD dwProcessId,
DWORD dwType);

Parameters

dwProcessId

Specifies the identifier of the process to register as a service process. Specifies NULL to register the current process.

dwType

Specifies whether the service is to be registered or unregistered. This parameter can be one of the following values.

Value Meaning
RSP_SIMPLE_SERVICE Registers the process as a service process.
RSP_UNREGISTER_SERVICE Unregisters the process as a service process.


Return Value

The return value is 1 if successful or 0 if an error occurs.

The following function is supported by the Windows 95 Service Control Manager.
RegisterServiceProcess

liunini 2003-08-25
  • 打赏
  • 举报
回复
?????

1,183

社区成员

发帖
与我相关
我的任务
社区描述
Delphi Windows SDK/API
社区管理员
  • Windows SDK/API社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧