|
It's been a few years since I did any TAPI work with modems, I mainly use phone systems now.
Seeing as the PHONE app didn't work, then it is possibly the modem setup, or maybe the TAPI configuration. On the julmar web site there is a sample called EnumTAPI. What does it report for your modem? It should be under unimodem.tsp.
Is the NT4 system up-to-date with service packs? There used to be lots of issues with NT4 and TAPI.
Try changing your lineOpen command to this.
<br />
lineOpen(g_hLineApp, m_dwDeviceID, &m_hLine, dwAPIVersion, 0, 1, LINECALLPRIVILEGE_OWNER|LINECALLPRIVILEGE_MONITOR, LINEMEDIAMODE_DATAMODEM, NULL);<br />
You could also try calling lineGetDevCaps first and get the dwMediaModes value and use that in place of LINEMEDIAMODE_DATAMODEM.
Are you getting any LINE_REPLY messages, are they reporting any errors.
Another source of help maybe, http://www.sellsbrothers.com/writing/telprog/. There are some good links here.
Michael
"Eureka" is Greek for "This bath is too hot"
|
|
|
|
|
Michael P Butler wrote:
What does it report for your modem? It should be under unimodem.tsp.
Negotiated Version: 2.0
Provider Info: Windows Telephony Service Provider for Universal Modem Driver
Switch Info: Switch information unavailable
PermanentLineID = 0x25A06
Bearer Modes: (0x41) Voice Passthrough
Max Data Rate: 9600
Media Modes: (0x14) InteractiveVoice DataModem
Supports: "tapi/line", "comm", "comm/datamodem", "comm/datamodem/portname", "ndis"
Line Features (0x8) MakeCall
Available Line Features (0x8) MakeCall
Address Type: Private
Address Capability Flags (0x20)
Destination addresses may be dialed on this address.
Max number of active calls: 1
Max number of held calls: 0
Max number of conferenced calls: 0
Address Features: (0x2) MakeCall
Call Features: (0x2000c5) Accept Answer Dial Drop SetCallParams
Number of stations using address: 0
Number of active calls: 0
Number of held calls: 0
Available Address Features: (0x2) MakeCall
Service Providers:
0x2 unimdm.tsp
0x1 kmddsp.tsp
I don't know what it all means, but hopefully you do
Michael P Butler wrote:
Is the NT4 system up-to-date with service packs?
Yes. SP6A
Michael P Butler wrote:
Try changing your lineOpen command to this.
lineOpen(g_hLineApp, m_dwDeviceID, &m_hLine, dwAPIVersion, 0, 1, LINECALLPRIVILEGE_OWNER|LINECALLPRIVILEGE_MONITOR, LINEMEDIAMODE_DATAMODEM, NULL);
Tried, but no change
Michael P Butler wrote:
You could also try calling lineGetDevCaps first and get the dwMediaModes value and use that in place of LINEMEDIAMODE_DATAMODEM.
dwMediaModes from lineGetDevCaps returns LINEMEDIAMODE_DATAMODEM | LINEMEDIAMODE_INTERACTIVEVOICE. Using this in the call to lineOpen returns 0x2F, LINEERR_INVALMEDIAMODE. Using just _DATAMODEM is ok though.
Michael P Butler wrote:
Are you getting any LINE_REPLY messages, are they reporting any errors.
Two LINE_REPLY messages are received (see earlier trace log), neither indicate any errors.
Michael P Butler wrote:
Another source of help maybe, http://www.sellsbrothers.com/writing/telprog/. There are some good links here.
I've downloaded the source, I'll have to look and see if it is any help.
Derek Lakin.
I wish I was what I thought I was when I wished I was what I am.
Salamander Software Ltd.
|
|
|
|
|
Hi,
I'm a bit new to visual c++ and i'm trying to figure out the right style to create and use new .h and .cpp files in vc++.
Say I want to implement a new module of the project in a seperate file. And say I created the new.h and new.cpp files. Now the question is, how should I set the #include lines in the entire project in order to make it work? In new.cpp, I want to use the libraries included in stdafx.h. And in the other parts of the application that stadfx.h is included, I want to use the code that resides in new.cpp.
I tried many different ways of including one another but I couldn't find an appropriate one. It either tels me that in my new.cpp file, "unexpected end of file while looking for precompiled header directive" error is present, or it reports multiple definitions.
I think you got what I'm trying to do, so pls help me how to set the include graph thorughout my application.
Thanx in advance.
|
|
|
|
|
#include "stdafx.h" must be the first #include of all, always. Apart from this, include the new header in those .cpp s that require it. If your new module is used by many other parts throughout the libvrary, you can edit stdafx.h and add the #include there.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Ok I see now. new.h includes nothing, new.cpp includes new.h and stdafx.h, and stdafx.h includes new.h. new.cpp is automatically built with other cpps.
Thanx again.
|
|
|
|
|
|
the stdafx.h has this line:
// TODO: reference additional headers your program requires here
I want to use new.h in most of the cpp files, so I guess what I did is apropriate.
|
|
|
|
|
gazihan wrote:
I want to use new.h in most of the cpp files, so I guess what I did is apropriate.
Okay! If you are including new.h inside stdafx.h, then do not include new.h in any of your cpp files, since by including stdafx.h you implicitly include new.h as well.
Regards
Nish
Author of the romantic comedy
Summer Love and Some more Cricket [New Win]
Buy it, read it and admire me
|
|
|
|
|
gazihan wrote:
"unexpected end of file while looking for precompiled header directive"
this error can usually be avoided by changing in Project/Settings/C C++ tab
Select a .cpp in the tree left
Category : Precompiled Header
Set it to Dont'use ...
But do not do that for stdafx.cpp of course
~RaGE();
|
|
|
|
|
In Windows XP, shadow could be dropped for the mouse cursor, menu, the
window(if the shadow style set), and even the text of the icon titles on desktop.
Anybody can you give me some tips on how those shadows are generated, how do you think Microsoft achieve this from your feeling? Does this effect need support by hardware? Are they using gaussian blur algorithm or something else like direct painting.
Any tips and discussions are welcome.
jason s
|
|
|
|
|
I think they use their (quite inefficient I might add) kernel-mode implementation for alpha blending. Possibly optimized for just use 50% intensity of the drop-shadow, but I'm quite (almost 100%) certain they don't use hardware support. Why? They still haven't spec'd it for the device drivers (AFAIK).
|
|
|
|
|
I got this link error in an ATL (dll) project, when using msxml2.h :
nafxcwd.lib(dllmodul.obj) : error LNK2005: _DllMain@12 already defined in RolesAndUsers.obj
where RolesAndUsers is the name of the project.
I've changed the linking options to ignore nafxcwd.lib and no effect occured.
Do you know how should i solve this problem?
rechi
|
|
|
|
|
In the project settings define the following symbol _AFXDLL, _USRDLL
..this is a VB Programmers' world and we all are just visitors - Someone in a MSJ article
|
|
|
|
|
Hi!
Anyone know the structure of a *.pst file generated by MS Outlook? I want to modify contact information.
Thanks
Bye,
Orbital^
...the night is long ... but not long enought to do some real coding ...
|
|
|
|
|
Orbital^ wrote:
I want to modify contact information.
Do you want to modify information of some of your contacts? If so, you may consider writing a VBA script.
Best regards,
Alexandru Savescu
|
|
|
|
|
Can't you use CDO for that? Or if you are really up for a challenge, use MAPI.
Have a look at http://www.slipstick.com
Michael
"Eureka" is Greek for "This bath is too hot"
|
|
|
|
|
Previously, the app is SDI... but the I want to change it to MDI.
So, CMainFrame (before derived from CFrameWnd) is derived from CMDIFrameWnd. But somehow rather, problems happen in here, the CreateView under OnCreateClient().... Anyone know the DO's and DON'Ts I need to know when converting from SDI to MDI....
// MainFrame.cpp
....
BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext)
{
...
// Add the filter view
if (!m_wndSplitterTop.CreateView(0, 0,
RUNTIME_CLASS(CFilterView), CSize(cxUpper, 0), pContext))
...
}
...
|
|
|
|
|
If you converting an SDI app where the view was split (two views onto the one document), you'd normally map that to an MDI application where each document frame (CMDIChildWnd) is split into two views.
So, you don't want to modify your CMainFrame class (now derived from CMDIFrameWnd), you want to derived a class from CMDIChildWnd, add a splitter and override its virtual OnCreateClientClient() call. Then modify the CMultiDocTemplate created in the applications InitInstance() function to use your derived class rather than CMDIChildWnd.
Stephen C. Steel
Kerr Vayne Systems Ltd.
|
|
|
|
|
Thanx 4 the help.
Can I create splitter window (and its view) on CMDIFrameWnd? I was thinking of doing something like VC++ where the Workspace is on the left of the splitter, and Output below another splitter, leaving the space left for ChildWnd. Any clue on these??
|
|
|
|
|
Help!
PostThreadMessage function fails without any apparent reason.
The Message Queue is present.
The Thread is present.
GetLastError returns that "the operation is successful"
BUT the message HAS NOT BEEN POSTED in the queue!!!
Much appreciated if someone could help me with this problem
Cheers,
wilche
|
|
|
|
|
This may sound silly, but did you try to but a breakpoint in the message handler to see it it gets there?
Show us some more code, may we can tell what's wrong!
Best regards,
Alexandru Savescu
|
|
|
|
|
Actually thanks for the reply but I think I may have found the problem.
I added a Sleep function to force the thread to give up some CPU resources, then it works fine. I do this whenever the PostThreadMessage fails. So I wait and then resend.
However, this seems to defeat the purpose of threads.
I have two versions of the same application running, the difference is that one version pass its work using UI thread, while the other uses the main thread to do all its work.
Currently it seems that the version using the UI thread is taking slightly longer than the other version because of this sleep function. It seems that the application is being seriously overloaded by the amount of messages it receives, causing it to resend lots of messages, making it sleep for long times! Furthermore it has taken me a lot more effort in getting this threaded version to work than the other version.
So maybe threading is not always the best solution to improve performance?
Kind regards,
wilche
|
|
|
|
|
wilche wrote:
So maybe threading is not always the best solution to improve performance?
There is no silver bullet. No, threading isn't always the best way to improve performance, though many (many many) applications could gain quite a bit of responsiveness and performance if they used threading in the right places, for the right reasons and in the right way.
|
|
|
|
|
applications could gain quite a bit of responsiveness and performance if they used threading in the right places, for the right reasons and in the right way.
This is so true. All too often I see people use threads and then fill the code with sync points (elements of the code where one thread must wait or sync with the other). Perfect threading has no sync points. Realistic threading has a few. Poor threading has the thread constantly syncing. When that happens, what is the real point.
Tim Smith
I know what you're thinking punk, you're thinking did he spell check this document? Well, to tell you the truth I kinda forgot myself in all this excitement. But being this here's CodeProject, the most powerful forums in the world and would blow your head clean off, you've got to ask yourself one question, Do I feel lucky? Well do ya punk?
|
|
|
|
|
here's my new problem:
RedrawWindow(hWnd,NULL,NULL,RDW_FRAME | RDW_ALLCHILDREN | RDW_INVALIDATE | RDW_ERASENOW);
how come this code doesn't end up calling the WM_NCPAINT message? i subclasses a menu window and i only get WM_NCPAINT when windows wants me to draw the new border, but i can't find a way to manually tell it to draw the border
- Roman -
|
|
|
|