http://www.hermes.com.cn/software/2000.07.17.htm:BOOL RegisterServiceProcess( DWORD dwPID, DWORD dwType )
参数: dwPID: 进程ID, NULL 代表当前进程
dwType: RSP_SIMPLE_SERVICE 为登记
RSP_UNREGISTER_SERVICE 为取消登记
返回值: TRUE: 调用成功
FALSE: 调用失败
参数: dwPID: 进程ID, NULL 代表当前进程
dwType: RSP_SIMPLE_SERVICE 为登记
RSP_UNREGISTER_SERVICE 为取消登记
返回值: TRUE: 调用成功
FALSE: 调用失败
一个比较完整的例子不过是在win95下的
public static extern uint GetPrivateProfileStringA(
string lpAppName,
string lpKeyName,
string lpDefault,
[MarshalAs(UnmanagedType.LPArray)] byte[] lpBuffer,
uint nSize,
string lpFileName);
代码最前面,加上引用:using System.Runtime.InteropServices;
public static extern uint GetPrivateProfileStringA(
string lpAppName,
string lpKeyName,
string lpDefault,
[MarshalAs(UnmanagedType.LPArray)] byte[] lpBuffer,
uint nSize,
string lpFileName);
++++++++++++++++++++++=
未处理的"System.EntryPointNotFoundException"类型的异常出现在 WindowsApplication1.exe 中。其他信息: 无法在 DLL kernel32 中找到名为 RegisterServiceProcess 的入口点。