Can you tell why doesn't this code work???
It compiles with 0 errors and 0 warnings but when it runs it crashes !!! (I have Win98 on my machine)
(I want my app not to be shown in the Ctrl+Alt+Del dialog)
.............
typedef DWORD (*P_REGISTER_SERVICE_PROCESS) (DWORD ,DWORD );
.............
BOOL CxxxDlg::OnInitDialog()
{
................................
HINSTANCE hKernel32 = LoadLibrary("kernel32.dll"
if (hKernel32 != NULL)
{
P_REGISTER_SERVICE_PROCESS pRegisterServiceProcess =(P_REGISTER_SERVICE_PROCESS)GetProcAddress(hKernel32,"RegisterServiceProcess"
if (pRegisterServiceProcess != NULL)
{
pRegisterServiceProcess(GetCurrentProcessId(),1);
}
}
..............
}
It compiles with 0 errors and 0 warnings but when it runs it crashes !!! (I have Win98 on my machine)
(I want my app not to be shown in the Ctrl+Alt+Del dialog)
.............
typedef DWORD (*P_REGISTER_SERVICE_PROCESS) (DWORD ,DWORD );
.............
BOOL CxxxDlg::OnInitDialog()
{
................................
HINSTANCE hKernel32 = LoadLibrary("kernel32.dll"
if (hKernel32 != NULL)
{
P_REGISTER_SERVICE_PROCESS pRegisterServiceProcess =(P_REGISTER_SERVICE_PROCESS)GetProcAddress(hKernel32,"RegisterServiceProcess"
if (pRegisterServiceProcess != NULL)
{
pRegisterServiceProcess(GetCurrentProcessId(),1);
}
}
..............
}