|
Hello
I just started working with TAPI 3.1 in C#, can anyone give me a short example how to use the methods defined by ITPhone (getDisplay, getAddress etc). Don’t need to handle any calls, just trying to get info from phone.
Thx in advance
|
|
|
|
|
Hi Guys,
i have a question concerning migrating code from VB.NET to C#.NET
The code is from a sample in VB, but i am using C#. You can sse the sample here :http://www.outlookcode.com/codedetail.aspx?id=755
Sub SetApptColorLabel(objAppt As Outlook.AppointmentItem,
[...]
Set objCDO = CreateObject("MAPI.Session")
objCDO.Logon "", "", False, False
End Sub
I dont understand where this "CreateObject" function comes from and what it does.
Can anyone help?
Thx, Daishi1002
|
|
|
|
|
You can open the vb code and look at the namespace there:
Microsoft.VisualBasic.Interaction.CreateObject
I haven't found out how to use the COM CreateObject in C#, as the return type is object and you can't call the Logon function like in vb. So I ended up put the createobject part in a dll and use it from C#.
|
|
|
|
|
But there must be an eqivalent in C#. And this Logon function, can I access it via the dll later, too?
Did you though all the provided code into your dll? Since i have very limited experience with VB, i don t like this idea...
Is this CreateObject something like
Object objCDO = new Object(); ?
But how can I insert the Parameter?
|
|
|
|
|
I don't think there is a direct equivalent in C#, I guess the CreateObject is a VB's thing. It isn't the same as create a new object instance.
I only threw the part where it create object and access the function, then return the result in VB.NET.
You could reference the target com object in your solution, it "should" create an interop reference you can use the com object directly. You can also wrap the com object in a wrapper class but it's too tedious for me. You can also put the code in VB.NET and reference the dll in C#.
YMMV though.
Wrapper Class:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/csref/html/vcwlkCOMInteropPart1CClientTutorial.asp
|
|
|
|
|
Using the Lutz Reflector, your VB.NET code approximates to the following C# code:
object objCDO = RuntimeHelpers.GetObjectValue(Interaction.CreateObject("MAPI.Session", "")); // Interaction is in Microsoft.VisualBasic dll.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Connor's Christmas Spectacular!
Judah Himango
|
|
|
|
|
Hi,
I'm downloading a byte[] from a web service which is actually a file. I'd like to open it without having to write it to disk - mapping it to memory, but can't find a way to do it.
Any help would be greatly appreciated, thanks in advance
|
|
|
|
|
In fact, you are not downloading a file, but its contents.
Now, let's say you have all the bytes in your byte[] . What do you mean by "opening", "mapping to memory"? You already have it in memory.
If you want the string represention, try the System.Text.Encoding.GetString(byte[]) method.
--------
"I say no to drugs, but they don't listen."
- Marilyn Manson
|
|
|
|
|
Maybe you can try:
MemoryStream memoryStream = new MemoryStream(buffer);
|
|
|
|
|
|
Ok sorry I didnt explain myself very clearly:
What I want to do is to start a process over the file I got in a byte[] format, as if was doing the following:
System.Diagnostics.Process.Start(myFile);
but instead of pointing to a physical file, I want to 'open' it from memory.
|
|
|
|
|
You cannot do that, because a file name is required, which tells the shell which application to start.
--------
"I say no to drugs, but they don't listen."
- Marilyn Manson
|
|
|
|
|
This is not possible unless you write some shell extension that can "launch" in-memory file bytes (it would do this probably by writing the in-memory bytes to disk behind the scenes).
|
|
|
|
|
Ok I'll have to think of a workaround. Anyway thanks for your help
|
|
|
|
|
hi all
i had made the class in VC++.NET which contain the API's now i want to use
this class in the C#.NET how to do that whether make the cllas library(DLL) of that class and
then use of simple only use the class.
i had not used those api's in the C# bcos it is difficult to get the help of
those api.
ddd
|
|
|
|
|
hi
iam working on a c# windows application . I need to develop a module that allows capturing video clips from web cam. i want to save video clips and not pictures from web cam.can anyone help me by giving me some sites in solving this .
thanks ramya
|
|
|
|
|
hi all,
can anyone please help in how to create tabs to switch between two or more options in a form
jeyakumar
|
|
|
|
|
hey you can use the toolbox option where there is an option of the tab control
|
|
|
|
|
thanks yaar... i am new to .net so only simple doubts.
|
|
|
|
|
is there any auto tracing tool available for .net2
nidheesh
|
|
|
|
|
What's an autotracing tool? What is it that you want to do?
You can use profilers (search for .Net profilers)
Or you can step through the code
Or you can insert your own Trace statements in the code
- Malhar
|
|
|
|
|
can you use delegate to execute unsafe method?
|
|
|
|
|
Yes, do you have a specific problem?
|
|
|
|
|
How can i dynamic choose the column display at my cystal report??
angela
|
|
|
|
|
http://aspalliance.com/661
It is not the only solution. I hope you aren't going to that direction. Sooner or later your user will ask for more difficult requirement for dynamic reports. Crystal Report doesn't really support dynamic report and it is limited in that area.
|
|
|
|