Click here to Skip to main content
15,906,947 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Redistributing of exe devloped using VC++ 6.0 Pin
CPallini5-Oct-09 0:30
mveCPallini5-Oct-09 0:30 
GeneralRe: Redistributing of exe devloped using VC++ 6.0 Pin
shir_k5-Oct-09 0:35
shir_k5-Oct-09 0:35 
GeneralRe: Redistributing of exe devloped using VC++ 6.0 Pin
CPallini5-Oct-09 2:39
mveCPallini5-Oct-09 2:39 
GeneralRe: Redistributing of exe devloped using VC++ 6.0 Pin
PJ Arends5-Oct-09 15:56
professionalPJ Arends5-Oct-09 15:56 
GeneralRe: Redistributing of exe devloped using VC++ 6.0 Pin
shir_k7-Oct-09 3:26
shir_k7-Oct-09 3:26 
QuestionAdd or remove the editbox border Pin
ratprita4-Oct-09 23:21
ratprita4-Oct-09 23:21 
AnswerRe: Add or remove the editbox border Pin
Chris Losinger5-Oct-09 6:32
professionalChris Losinger5-Oct-09 6:32 
Questionwin32 service for device detection Pin
_T("No name")4-Oct-09 23:04
_T("No name")4-Oct-09 23:04 
hi i am writing a win 32 service while will detect the USB device when connected. I need to know the name of device which is connected i have written following service handler.

VOID WINAPI ServiceHandler(DWORD fdwControl,DWORD evtype, LPVOID evdata, LPVOID Context)
{
/*DEV_BROADCAST_VOLUME* pDev = (DEV_BROADCAST_VOLUME*)evdata;*/
DEV_BROADCAST_HDR* pHdr = (DEV_BROADCAST_HDR*)evdata;
switch(fdwControl)
{
case SERVICE_CONTROL_STOP:
case SERVICE_CONTROL_SHUTDOWN:
ProcessStarted = FALSE;
ServiceStatus.dwWin32ExitCode = 0;
ServiceStatus.dwCurrentState = SERVICE_STOPPED;
ServiceStatus.dwCheckPoint = 0;
ServiceStatus.dwWaitHint = 0;
// terminate all processes started by this service before shutdown
{

EndProcess(/*i*/0);
delete ProcessNames[/*i*/0];
}
break;
case SERVICE_CONTROL_PAUSE:
ServiceStatus.dwCurrentState = SERVICE_PAUSED;
break;
case SERVICE_CONTROL_CONTINUE:
ServiceStatus.dwCurrentState = SERVICE_RUNNING;
break;
case SERVICE_CONTROL_INTERROGATE:
break;
case SERVICE_CONTROL_DEVICEEVENT:
switch(evtype)
{
case DBT_DEVICEARRIVAL:
//DEV_BROADCAST_VOLUME* pDev = (DEV_BROADCAST_VOLUME*)evdata;
if(pHdr->dbch_devicetype == DBT_DEVTYP_DEVICEINTERFACE)
{
DEV_BROADCAST_DEVICEINTERFACE *pDevInt = (DEV_BROADCAST_DEVICEINTERFACE*)evdata;
UpdateDevice(pDevInt,(WPARAM)evtype);
}
break;
case DBT_DEVICEREMOVECOMPLETE:
//DEV_BROADCAST_VOLUME* pDev = (DEV_BROADCAST_VOLUME*)evdata;
if(pHdr->dbch_devicetype == DBT_DEVTYP_DEVICEINTERFACE)
{
DEV_BROADCAST_DEVICEINTERFACE *pDevInt = (DEV_BROADCAST_DEVICEINTERFACE*)evdata;
UpdateDevice(pDevInt,(WPARAM)evtype);
}
break;
}
break;
}
in case of DBT_DEVICEARRIVAL the pDevInt i am getting does not contain the dbcc_name string. it only contains "\". Plz help where i am doing wrong

thanx in advance
QuestionHow to Wipe/Clean Internet Explorer temporary internet Files, Cookies, History, Cache using C++/VC++/MFC Pin
Shiv Murti Pal4-Oct-09 23:00
Shiv Murti Pal4-Oct-09 23:00 
AnswerRe: How to Wipe/Clean Internet Explorer temporary internet Files, Cookies, History, Cache using C++/VC++/MFC Pin
DeepakMega4-Oct-09 23:14
DeepakMega4-Oct-09 23:14 
GeneralRe: How to Wipe/Clean Internet Explorer temporary internet Files, Cookies, History, Cache using C++/VC++/MFC Pin
Shiv Murti Pal4-Oct-09 23:24
Shiv Murti Pal4-Oct-09 23:24 
GeneralRe: How to Wipe/Clean Internet Explorer temporary internet Files, Cookies, History, Cache using C++/VC++/MFC Pin
Rajesh R Subramanian5-Oct-09 0:54
professionalRajesh R Subramanian5-Oct-09 0:54 
GeneralRe: How to Wipe/Clean Internet Explorer temporary internet Files, Cookies, History, Cache using C++/VC++/MFC Pin
Shiv Murti Pal5-Oct-09 1:17
Shiv Murti Pal5-Oct-09 1:17 
GeneralRe: How to Wipe/Clean Internet Explorer temporary internet Files, Cookies, History, Cache using C++/VC++/MFC Pin
Michael Schubert5-Oct-09 1:30
Michael Schubert5-Oct-09 1:30 
GeneralRe: How to Wipe/Clean Internet Explorer temporary internet Files, Cookies, History, Cache using C++/VC++/MFC Pin
Shiv Murti Pal5-Oct-09 1:48
Shiv Murti Pal5-Oct-09 1:48 
GeneralRe: How to Wipe/Clean Internet Explorer temporary internet Files, Cookies, History, Cache using C++/VC++/MFC Pin
Michael Schubert5-Oct-09 2:21
Michael Schubert5-Oct-09 2:21 
AnswerRe: How to Wipe/Clean Internet Explorer temporary internet Files, Cookies, History, Cache using C++/VC++/MFC Pin
CPallini5-Oct-09 3:31
mveCPallini5-Oct-09 3:31 
AnswerRe: How to Wipe/Clean Internet Explorer temporary internet Files, Cookies, History, Cache using C++/VC++/MFC Pin
David Crow5-Oct-09 4:03
David Crow5-Oct-09 4:03 
AnswerRe: How to Wipe/Clean Internet Explorer temporary internet Files, Cookies, History, Cache using C++/VC++/MFC Pin
Randor 5-Oct-09 9:52
professional Randor 5-Oct-09 9:52 
GeneralRe: How to Wipe/Clean Internet Explorer temporary internet Files, Cookies, History, Cache using C++/VC++/MFC Pin
kilt8-Oct-09 23:42
kilt8-Oct-09 23:42 
GeneralRe: How to Wipe/Clean Internet Explorer temporary internet Files, Cookies, History, Cache using C++/VC++/MFC Pin
Randor 9-Oct-09 11:54
professional Randor 9-Oct-09 11:54 
Questionlet rename file just after it creation in explorer Pin
MrKBA4-Oct-09 22:48
MrKBA4-Oct-09 22:48 
AnswerRe: let rename file just after it creation in explorer Pin
Richard MacCutchan5-Oct-09 1:11
mveRichard MacCutchan5-Oct-09 1:11 
GeneralRe: let rename file just after it creation in explorer Pin
MrKBA5-Oct-09 8:18
MrKBA5-Oct-09 8:18 
GeneralRe: let rename file just after it creation in explorer Pin
Richard MacCutchan5-Oct-09 10:30
mveRichard MacCutchan5-Oct-09 10:30 

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.