Click here to Skip to main content
15,915,093 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to send message to another program? Pin
RichardWdy25-Jul-02 18:58
RichardWdy25-Jul-02 18:58 
GeneralRe: How to send message to another program? Pin
Williams26-Jul-02 3:54
Williams26-Jul-02 3:54 
GeneralControl Panel Applet Pin
Manish Wadhera22-Jul-02 18:00
Manish Wadhera22-Jul-02 18:00 
GeneralRe: Control Panel Applet Pin
Ernest Laurentin22-Jul-02 19:04
Ernest Laurentin22-Jul-02 19:04 
Questionwhy message memory leaks? Pin
whelk22-Jul-02 16:09
whelk22-Jul-02 16:09 
AnswerRe: why message memory leaks? Pin
rokia22-Jul-02 16:23
rokia22-Jul-02 16:23 
GeneralDisconnect modem from app Pin
Ravi Bhavnani22-Jul-02 14:52
professionalRavi Bhavnani22-Jul-02 14:52 
GeneralRe: Disconnect modem from app Pin
Peter Occil22-Jul-02 15:30
Peter Occil22-Jul-02 15:30 
I wrote a function that disconnects the modem:
#include <windows.h>
#include <ras.h>

void HangUp(){
 RASCONN *rasc=malloc(1000);
 DWORD bs,nc,i,j,dwRet;
 RASCONNSTATUS rcs;
 MSG msg;
 TCHAR s[257];
 rcs.dwSize=160;
 rasc->dwSize=412;
 dwRet=RasEnumConnections(rasc,&bs,&nc);
 if(!bs)return;
 rasc=realloc(rasc,bs);
 if(RasEnumConnections(rasc,&bs,&nc))
  return;
 for(i=0;i<bs/412;i++){
  HRASCONN hrc=rasc[i].hrasconn;
  dwRet = RasGetConnectStatus(hrc, &rcs);
  if (dwRet != ERROR_INVALID_HANDLE){
   RasHangUp(hrc);
   while (dwRet != ERROR_INVALID_HANDLE){
    while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)){
     TranslateMessage(&msg);
     DispatchMessage(&msg);
    }
    dwRet = RasGetConnectStatus(hrc, &rcs);
   }
  }
 }
 free(rasc);
}




Peter O.
GeneralRe: Disconnect modem from app Pin
Ravi Bhavnani22-Jul-02 15:32
professionalRavi Bhavnani22-Jul-02 15:32 
GeneralRC4 encryption problems... *updated* Pin
Anonymous22-Jul-02 14:10
Anonymous22-Jul-02 14:10 
GeneralRe: RC4 encryption problems... *updated* Pin
Anonymous22-Jul-02 18:53
Anonymous22-Jul-02 18:53 
GeneralRC4 encryption problems... Pin
Anonymous22-Jul-02 14:09
Anonymous22-Jul-02 14:09 
GeneralWinsock Error 10038 while FTPing Pin
Anonymous22-Jul-02 11:54
Anonymous22-Jul-02 11:54 
GeneralNeed Help with IPC in C Pin
Klumsy22-Jul-02 11:51
Klumsy22-Jul-02 11:51 
GeneralRe: Need Help with IPC in C Pin
Alexandru Savescu22-Jul-02 23:07
Alexandru Savescu22-Jul-02 23:07 
GeneralRe: Need Help with IPC in C Pin
jan larsen23-Jul-02 0:23
jan larsen23-Jul-02 0:23 
GeneralRe: Need Help with IPC in C Pin
Anonymous23-Jul-02 0:57
Anonymous23-Jul-02 0:57 
GeneralRe: Need Help with IPC in C Pin
jan larsen23-Jul-02 1:22
jan larsen23-Jul-02 1:22 
QuestionHow to convert CString to char*? Pin
nachilau22-Jul-02 11:06
nachilau22-Jul-02 11:06 
AnswerRe: How to convert CString to char*? Pin
Chris Losinger22-Jul-02 11:09
professionalChris Losinger22-Jul-02 11:09 
GeneralRe: How to convert CString to char*? Pin
Navin22-Jul-02 11:20
Navin22-Jul-02 11:20 
AnswerRe: How to convert CString to char*? Pin
Dave Bryant22-Jul-02 11:20
Dave Bryant22-Jul-02 11:20 
AnswerRe: How to convert CString to char*? Pin
paulb22-Jul-02 15:04
paulb22-Jul-02 15:04 
AnswerRe: How to convert CString to char*? Pin
GBlank22-Jul-02 20:45
sussGBlank22-Jul-02 20:45 
GeneralRe: How to convert CString to char*? Pin
vikramlinux22-Jul-02 21:08
vikramlinux22-Jul-02 21:08 

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.