|
Hi
i need help ...
i want to make program which can dial a phone using modem connected with a telephone line..and similarly record a
conversation and also set up a voice mail..i'm a bit familiar with c sharp language so would like to do in a c sharp language..if anyone had got any idea about it then..plz help me..
Thank You
|
|
|
|
|
In our company we use TopTAPI (the dll-version) to do this maybe you should test it. TopTAPI (its not freeware)!
Alternativly take a look at the TAPI (I would use TAPI3).
At least 1 hint: Its not fun to do this for analog connectors/telephones because you need a special modem (full-duplex and some other stuff I forgot) to do this and also in most cases the connection is only a one way (both are connected but only one of them could speak).
So just use it with ISDN and above (for example VoIP, but I never tested with TAPI).
Greetings
Covean
|
|
|
|
|
Hi!Covean
Thank x for your suggestion...isn't it possible with the inbuilt modem in a computer(the one which is used to connect dial up line)..what i want is if the phone line is connected to the computer via modem then..is it possible that all the phone works i.e. dialling or receiving call...could be done with the application..this is wht all i want..
Regards
DRS2010
|
|
|
|
|
As said before, it depends on the caps of the modem. But in theory it should work.
But here some impressions of mine, I made during our "virtual portier"-project.
Some day a customer of us wanted this solution but on a analog telephone system (we only installed it on ISDN before). This project really drove me cracy. We tested about 5 modem-types. Sometimes we had a full connection, sometimes only one of us could speak and so on... Till the end of the project we never found a stable solution for this (at least we solved it with an analog<->ISDN converter)!
So it should be possible but I would not recommend it!
Edit: To your question: I don't think that you will be able or happy to do this with the build-in-modem. But checking the line status, dialing and recieving calls will be able with TAPI.
Greetings
Covean
modified on Tuesday, January 19, 2010 3:48 AM
|
|
|
|
|
Hi Covean
Thank x a lot for your idea
So dialling and receiving calls is possible with TAPI.Do you have any idea about such type of application i mean phone dialling and receing application with the use of TAPI.
Regards
|
|
|
|
|
No I do not because the TopTAPI.dll (I mentioned in my first post) were cheaper then the time I had needed to develop it on my own, so our company decided to just buy it.
Sorry that I can't help you any further.
Greetings
Covean
|
|
|
|
|
Hi,
Good
modified 3-Jul-12 4:58am.
|
|
|
|
|
1. Not everyone can see that. Since it is not yet approved.
2. People have already posted their view below the article and through votes.
50-50-90 rule: Anytime I have a 50-50 chance of getting something right, there's a 90% probability I'll get it wrong...!!
|
|
|
|
|
Lame attempt at self promotion. Based on the votes so far I doubt anyone will even see this "article"
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Hi all,
I want to execute an executable file under particular user account in my C# application.
can any body tell me how to do the same?
Thanking You,
Sunil G.
|
|
|
|
|
you could check the "runas" command
specify the executable and particular user as arguments.
|
|
|
|
|
using Process.Start [^], it supports launching a process under a particular user;
MSDN states:
Use this overload to create a new process and its primary thread by specifying its file name, command-line arguments, user name, password, and domain. The new process then runs the specified executable file in the security context of the specified credentials (user, domain, and password).
I are Troll
|
|
|
|
|
I want to execute using current logged on user token.
|
|
|
|
|
Then you'd only need to start it, without giving credentials at all - and the process will be started under the credentials of the current (signed in) user
I are Troll
|
|
|
|
|
You have got an eMail. (I hope ).
Hope that helps you.
Greetings
Covean
|
|
|
|
|
Yeh i got ur mail.
Thank u very much.
|
|
|
|
|
questions should be answered within the thread, and not by e-mail.
That way anyone can benefit.
|
|
|
|
|
Yes there you are right but I send him more than 300 lines of code.
I think this is tooo long for this forum.
But here a short version (with out DLLImports, structs, ...):
public static void StartProcessOnActiveConsole(string szApplication, string szArguments, string szDirectory)
{
IntPtr hUserToken = IntPtr.Zero;
IntPtr hDuplicatedUserToken = IntPtr.Zero;
IntPtr lpEnvironment = IntPtr.Zero;
IntPtr hProcess = IntPtr.Zero;
IntPtr hThread = IntPtr.Zero;
try
{
uint dwSessionId = 0xFFFFFFFF;
dwSessionId = WTSGetActiveConsoleSessionId();
if (dwSessionId == 0xFFFFFFFF)
return;
if(!WTSQueryUserToken(dwSessionId, ref hUserToken))
throw new Exception("WTSQueryUserToken failed. GetLastError() = " + Marshal.GetLastWin32Error());
if(!DuplicateTokenEx(hUserToken, 0x02000000 , IntPtr.Zero, SECURITY_IMPERSONATION_LEVEL.SecurityImpersonation, TOKEN_TYPE.TokenPrimary, ref hDuplicatedUserToken))
throw new Exception("DuplicateTokenEx failed. GetLastError() = " + Marshal.GetLastWin32Error());
if(!CreateEnvironmentBlock(ref lpEnvironment, hDuplicatedUserToken, false))
throw new Exception("CreateEnvironmentBlock failed. GetLastError() = " + Marshal.GetLastWin32Error());
STARTUPINFO startupInfo = new STARTUPINFO();
startupInfo.dwSize = (uint)Marshal.SizeOf(startupInfo);
startupInfo.pReserved = IntPtr.Zero;
startupInfo.szDesktop = "winsta0\\default";
startupInfo.pTitle = IntPtr.Zero;
startupInfo.dwX = 0;
startupInfo.dwY = 0;
startupInfo.dwXSize = 0;
startupInfo.dwYSize = 0;
startupInfo.dwXCountChars = 0;
startupInfo.dwYCountChars = 0;
startupInfo.dwFillAttribute = 0;
startupInfo.dwFlags = 128 ;
startupInfo.wShowWindow = 0;
startupInfo.wReserved2 = 0;
startupInfo.lpReserved2 = IntPtr.Zero;
startupInfo.hStdInput = IntPtr.Zero;
startupInfo.hStdOutput = IntPtr.Zero;
startupInfo.hStdError = IntPtr.Zero;
PROCESS_INFORMATION processInformation = new PROCESS_INFORMATION();
StringBuilder szCommandLineBuilder = new StringBuilder(32768);
szCommandLineBuilder.Append("\"" + szApplication + "\" " + (string)((szArguments == null) ? string.Empty : szArguments));
string szDir = ((szDirectory == null) || (szDirectory == string.Empty)) ? null : szDirectory;
if(!CreateProcessAsUser(hDuplicatedUserToken, null, szCommandLineBuilder, IntPtr.Zero, IntPtr.Zero, false, 0x00000400 , lpEnvironment, szDir, startupInfo, ref processInformation))
throw new Exception("CreateProcessAsUser failed. GetLastError() = " + Marshal.GetLastWin32Error());
hProcess = processInformation.hProcess;
hThread = processInformation.hThread;
}
finally
{
}
}
Greetings
Covean
|
|
|
|
|
Hi!!
1) I want to develop a program to hook on winspool.drv and be noticed whenever StartPagePrinter and EndPagePrinter functions are called. 've searched extensively having no luck. Wonder if you could help me by providing some sample codes or tutorials because I'm not familiarized with hooking apis.
2)The final goal of my program is to append some information on the printed pages sent by any application, is that possible?
Thank you!
|
|
|
|
|
I need to reference a combobox value (selectedvalue) on another form to the current form. How can I do this please?
I tried setting the combobox modifier to 'Public' and while in NewForm using MainForm.myComboBox.selectedValue without success.
|
|
|
|
|
Its bad practise to make such properties public as it lessens the object orientation of the control containing the combo box and starts going down the route of coupling the 2nd form to the 1st.
The thing to do is to raise an event in the first form (the one containing the combo box) that the second form subscibes to. The event should probably (depending upon your requirements) be raised when the combo box seleceted value changes.
Another way to solver you problem is to implement a model-view-viewmodel pattern, but this requires much more work if you have exisiting code.
CCC solved so far: 2 (including a Hard One!)
37!?!! - Randall, Clerks
|
|
|
|
|
Many thanks for that. I shall proceed accordingly.
|
|
|
|
|
Hi guys..
I have developed a console application that migrates data present in xml file to my database.. my console application asks the app name from the user and based on the name entered by the user the application migrates only those records corresponding to that app name.. Now my question is after the migration is done my console application exits.. but i dont want it to exit, instead it must ask the user whether to exit if the user enters "exit" then it must exit otherwise the console application should repeat its migration process from the beginning and ask the user the app name and so on it goes... how do i implement this logic???
Thanx in advance..
Regards,
Tash
|
|
|
|
|
Message Closed
modified 23-Nov-14 6:54am.
|
|
|
|
|
Thanx it worked fine...
Regards,
Tash
|
|
|
|