开发驱动程序时,每次都用INF文件安装再加载实在是很麻烦,就写个程序来实现。
但是在实现驱动程序开机启动时却遇到了问题。
函数原型如下:
CreateService Function
Creates a service object and adds it to the specified service control manager database.
SC_HANDLE WINAPI CreateService(
__in SC_HANDLE hSCManager,
__in LPCTSTR lpServiceName,
__in LPCTSTR lpDisplayName,
__in DWORD dwDesiredAccess,
__in DWORD dwServiceType,
__in DWORD dwStartType,
__in DWORD dwErrorControl,
__in LPCTSTR lpBinaryPathName,
__in LPCTSTR lpLoadOrderGroup,
__out LPDWORD lpdwTagId,
__in LPCTSTR lpDependencies,
__in