Click here to Skip to main content
15,896,343 members
Home / Discussions / System Admin
   

System Admin

 
AnswerRe: Remote desktop connection Pin
Sebastian Schneider30-May-06 0:57
Sebastian Schneider30-May-06 0:57 
GeneralRe: Remote desktop connection Pin
x-trate30-May-06 1:12
x-trate30-May-06 1:12 
GeneralRe: Remote desktop connection Pin
Mekong River30-May-06 15:09
Mekong River30-May-06 15:09 
AnswerRe: Remote desktop connection Pin
JohnAMilburn1-Jun-06 6:10
JohnAMilburn1-Jun-06 6:10 
AnswerRe: Remote desktop connection Pin
S Douglas4-Jun-06 14:40
professionalS Douglas4-Jun-06 14:40 
GeneralRe: Remote desktop connection Pin
x-trate9-Jun-06 5:27
x-trate9-Jun-06 5:27 
GeneralRe: Remote desktop connection Pin
S Douglas9-Jun-06 6:57
professionalS Douglas9-Jun-06 6:57 
QuestionWindows Service Problem Pin
bmurali29-May-06 19:42
bmurali29-May-06 19:42 
Hello,
I'm writing an windows service application to scan for any USB device changes(ie if any USB device was inserted or removed from the system) This has to be an non UI application. I have an service that is declared as follows

MyServiceStatus.dwServiceType = SERVICE_WIN32;
MyServiceStatus.dwCurrentState = SERVICE_START_PENDING;
MyServiceStatus.dwControlsAccepted = SERVICE_ACCEPT_STOP | SERVICE_ACCEPT_HARDWAREPROFILECHANGE ;
MyServiceStatus.dwWin32ExitCode = 0;
MyServiceStatus.dwServiceSpecificExitCode = 0;
MyServiceStatus.dwCheckPoint = 0;
MyServiceStatus.dwWaitHint = 0;

MyServiceStatusHandle = RegisterServiceCtrlHandlerEx("USB Trap Service", MyServiceCtrlHandler,NULL);


I'm registering for messages using the register device notification

memset(&dbdi, 0, sizeof(dbdi));
dbdi.dbcc_size = sizeof(DEV_BROADCAST_DEVICEINTERFACE);
dbdi.dbcc_classguid = GUID_DEVINTERFACE_USB_DEVICE;
dbdi.dbcc_devicetype = DBT_DEVTYP_DEVICEINTERFACE;

SStatusHandle = RegisterDeviceNotification((HANDLE)MyServiceStatusHandle,(LPVOID)&dbdi,DEVICE_NOTIFY_SERVICE_HANDLE);

The service control handler is as follows

DWORD WINAPI MyServiceCtrlHandler (DWORD Opcode,DWORD dwEventType,LPVOID lpEventData, PVOID lpContext)
{
DWORD status;

switch(Opcode)
{
case SERVICE_CONTROL_DEVICEEVENT:
{

switch((int) dwEventType)
{
case DBT_DEVICEARRIVAL:
break;

case DBT_DEVICEREMOVECOMPLETE:
break;
}
break;
}
}
}

The service is registered and starts and terminates correctly. I'm not receiving any of the device change message.

Any help will be apprecitated

Regards,
murali

QuestionSNMP Proxy Agent?? Pin
mikeyhardingboyo29-May-06 8:53
mikeyhardingboyo29-May-06 8:53 
AnswerRe: SNMP Proxy Agent?? Pin
Mekong River29-May-06 15:43
Mekong River29-May-06 15:43 
QuestionNeed explain of these TCP/IP command line Pin
Mekong River29-May-06 0:10
Mekong River29-May-06 0:10 
AnswerRe: Need explain of these TCP/IP command line Pin
stancrm29-May-06 3:36
stancrm29-May-06 3:36 
GeneralRe: Need explain of these TCP/IP command line Pin
Mekong River29-May-06 5:59
Mekong River29-May-06 5:59 
Questionschedsvc.dll crash after 15 minutes Pin
mav@octaval28-May-06 23:11
mav@octaval28-May-06 23:11 
AnswerRe: schedsvc.dll crash after 15 minutes Pin
Mekong River28-May-06 23:40
Mekong River28-May-06 23:40 
GeneralRe: schedsvc.dll crash after 15 minutes Pin
mav@octaval29-May-06 3:25
mav@octaval29-May-06 3:25 
GeneralRe: schedsvc.dll crash after 15 minutes Pin
Mekong River29-May-06 5:44
Mekong River29-May-06 5:44 
QuestionOpening USB Problem Pin
albCode28-May-06 21:01
albCode28-May-06 21:01 
AnswerRe: Opening USB Problem Pin
Mekong River28-May-06 21:45
Mekong River28-May-06 21:45 
GeneralRe: Opening USB Problem Pin
albCode28-May-06 22:15
albCode28-May-06 22:15 
GeneralRe: Opening USB Problem Pin
Mekong River28-May-06 23:35
Mekong River28-May-06 23:35 
GeneralRe: Opening USB Problem Pin
albCode28-May-06 23:46
albCode28-May-06 23:46 
GeneralRe: Opening USB Problem Pin
Mekong River28-May-06 23:53
Mekong River28-May-06 23:53 
GeneralRe: Opening USB Problem Pin
albCode29-May-06 0:42
albCode29-May-06 0:42 
GeneralRe: Opening USB Problem Pin
Mekong River29-May-06 5:48
Mekong River29-May-06 5:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.