Click here to Skip to main content
16,005,473 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: URGENT !!!Creating a CONSOLE AND WRITING TO IT Pin
Oliver Anhuth29-Aug-01 22:18
Oliver Anhuth29-Aug-01 22:18 
GeneralRe: URGENT !!!Creating a CONSOLE AND WRITING TO IT Pin
kumar_p329-Aug-01 22:32
kumar_p329-Aug-01 22:32 
GeneralToolbar Pin
29-Aug-01 20:41
suss29-Aug-01 20:41 
Generalabout hyperlink drag&drop Pin
29-Aug-01 20:41
suss29-Aug-01 20:41 
GeneralCOM PORT PROBLEM Pin
Sandeep Shetty29-Aug-01 20:30
Sandeep Shetty29-Aug-01 20:30 
GeneralRe: COM PORT PROBLEM Pin
Joaquín M López Muñoz29-Aug-01 21:48
Joaquín M López Muñoz29-Aug-01 21:48 
GeneralRe: COM PORT PROBLEM Pin
Sandeep Shetty29-Aug-01 22:16
Sandeep Shetty29-Aug-01 22:16 
GeneralRe: COM PORT PROBLEM Pin
Joaquín M López Muñoz30-Aug-01 0:34
Joaquín M López Muñoz30-Aug-01 0:34 
Well this little piece of code shows how to use lineGetID(). Assume you've got a HCALL handle obtained with lineMakeCall in passthrough mode:
LONG   res;
LPVARSTRING p_varString=NULL;
size_t size=sizeof(VARSTRING)+1024;
HANDLE hCOM;

for( ; ; ){
  if((p_varString=(LPVARSTRING)malloc(size))==NULL)return FALSE;
  p_varString->dwTotalSize=size;

  if(lineGetID(0,0,hCall,LINECALLSELECT_CALL,p_varString,"comm/datamodem")!=0){
    free(p_varString);
    return FALSE;
  }
  else if(p_varString->dwNeededSize>size){
    size=p_varString->dwNeededSize;
    free(p_varString);
  }
  else break;
}
hCOM=*((LPHANDLE)((LPBYTE)p_varString+p_varString->dwStringOffset));
free(p_varString);

Try with this to see if you're any luckier.
As for overlapped mode, I'm afraid that if you're obtaining you're COM handle via lineGetID() instead that with CreateFile() then you must assume that the port may be in overlapped mode. This mode is supported on all Windows OSs starting from Win95. The Microsoft sample TAPICOMM shows how to deal with WriteFile() and ReadFile() handling both modes (overlapped and nonoverlapped) in a unified way.

Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
GeneralRe: COM PORT PROBLEM Pin
Sandeep Shetty30-Aug-01 11:51
Sandeep Shetty30-Aug-01 11:51 
GeneralRe: COM PORT PROBLEM Pin
Joaquín M López Muñoz30-Aug-01 12:13
Joaquín M López Muñoz30-Aug-01 12:13 
GeneralRe: COM PORT PROBLEM Pin
Sandeep Shetty30-Aug-01 13:14
Sandeep Shetty30-Aug-01 13:14 
GeneralRe: COM PORT PROBLEM Pin
Joaquín M López Muñoz30-Aug-01 21:04
Joaquín M López Muñoz30-Aug-01 21:04 
GeneralComboBox messages Pin
Michael Martin29-Aug-01 20:29
professionalMichael Martin29-Aug-01 20:29 
GeneralRe: ComboBox messages Pin
Matt.W.29-Aug-01 21:18
Matt.W.29-Aug-01 21:18 
GeneralRe: ComboBox messages Pin
Michael Martin30-Aug-01 2:24
professionalMichael Martin30-Aug-01 2:24 
Generalgrid controls Pin
29-Aug-01 19:48
suss29-Aug-01 19:48 
GeneralCSystemTray MDI Pin
jdt29-Aug-01 19:44
jdt29-Aug-01 19:44 
GeneralAbout "__stdcall" and "__cdecl" Pin
Maer72729-Aug-01 17:17
Maer72729-Aug-01 17:17 
GeneralRe: About Pin
Michael Dunn29-Aug-01 18:37
sitebuilderMichael Dunn29-Aug-01 18:37 
GeneralRe: About Pin
Maer72729-Aug-01 22:07
Maer72729-Aug-01 22:07 
GeneralCList/CArray duplicate link problem Pin
Wayne Janaway29-Aug-01 15:52
Wayne Janaway29-Aug-01 15:52 
GeneralRe: CList/CArray duplicate link problem Pin
Tomasz Sowinski30-Aug-01 1:24
Tomasz Sowinski30-Aug-01 1:24 
GeneralRe: CList/CArray duplicate link problem Pin
Wayne Janaway30-Aug-01 11:14
Wayne Janaway30-Aug-01 11:14 
GeneralRe: CList/CArray duplicate link problem Pin
Tomasz Sowinski30-Aug-01 11:21
Tomasz Sowinski30-Aug-01 11:21 
GeneralWait for worker thread to finish Pin
PJ Arends29-Aug-01 15:19
professionalPJ Arends29-Aug-01 15:19 

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.