|
Now that makes sense. I was developing on my laptop with that has office 2003 and then trying it on a machine with office 2000. For some reason I thought to use the interop would require finding a way to determine with one to use lib to use at runtime.
Thanks for the info. I'll try it out.
Darren
|
|
|
|
|
Heath...
That worked perfectly. I'm using a typelib from word 2000 and it also works with XP and 2003.
Thanks again.
Darren
|
|
|
|
|
Hi
how i can send an email from my computer to an email address on yahoo ??? or any where?
it means that i dont know some parameters of SMTP ' QuickSend method like
"SMTPServerName".
thanks.
|
|
|
|
|
For the uninformed, QuickSend and SMTPServerName are both API calls in Quiksoft STMP email API for .NET.
WDI, e-mails are sent using an SMTP mail server. If you're running Windows XP Pro, a mail server is built into the machine. Typically, the address of an SMTP server is something like smtp.provider.com -- you can use your XP Pro machine to be the mail server for you, or use an existing mail service, or one provided by your ISP; either case you need to get the smtp mail address for the mail service you want to use for sending your email.
Any remotely useful information on my blog will be removed immediately. There are 10 kinds of people in the world. Those who have heard of the ubiquitous, overused, worn-out-like-an-old-shoe binary "joke" and those who haven't.
Judah Himango
|
|
|
|
|
A CDO client is included with Win2K and above, and you can install the Virtual SMTP Service for IIS in Pro/eHome, but it is not there by default. It can be added easily enough through Add/Remove Programs, but many people have trouble configuring it especially when it comes to forwarding to an outgoing SMTP host that accepts forward from their "domain".
SMTP connections can often be - except when blocked by firewalls - made from your local machine directly, rather than forwarding to another SMTP host. To the original poster, if you click "Search comments" and search for "SMTP" you can find many messages related to sending emails yourself.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
Hi
I've written my own VNC Client using classes from cdot.senecac.on.ca/projects/vncsharp/
It works fine!
But I got one Problem!
I need a solution to expand the Contxt Menu that opens when you click
right on the Title bar from the Windows Form. It shows only 'Close',
'Minimize' etc.. It's the same Dialog when a Form is minimized to the Task bar.
In the Form Propertys I found no answer. Where is it anchored?
Thx from Germany!!
|
|
|
|
|
|
But there's just two values. True or false..How can I change the ContextMenu.
Or how can I add something to the ContextMenu??
thx
|
|
|
|
|
|
Hi!
Unfortunately, you can't do this with built-in properties.
You'll have to use P/invoke and override WndProc, but that's not too hard and works well.
There's even an article here on CP: Customizing WinForm's System Menu[^]
Best regards from Germany as well
mav
|
|
|
|
|
That is exactly what I'm looking for!
|
|
|
|
|
does any one know how to workaround the memory issues with the tree view web control.
|
|
|
|
|
1. What memory issues? (link would help)
2. What is the tree view web control? (link would help)
Any remotely useful information on my blog will be removed immediately. There are 10 kinds of people in the world. Those who have heard of the ubiquitous, overused, worn-out-like-an-old-shoe binary "joke" and those who haven't.
Judah Himango
|
|
|
|
|
3. Why are you posting here? Questions about ASP.NET development - despite what language you're using unless it's a language-specific problem - belong in the ASP.NET forum.
If you're referring to the Microsoft IE TreeView[^] you may have better luck in the Internet Explorer Web Controls[^] forum on http://asp.net[^], which exists soly for support of the IE WebControls.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
|
does any one know how to workaround the memory issues with the tree view web control.
|
|
|
|
|
I can create a singleton class that shares a single of a class within a application.. does anyone know how to approach sharing between application. Would I have to use serilzation to achieve this.. does anyone have examples..
Sk8tZ
|
|
|
|
|
Sharing between applications -- sharing a variable across applications? If this is the case, and both applications are .NET apps, you should look at .NET remoting (System.Runtime.Remoting). What you would do is extract an interface from the class you want to share. Give that interface to both applications. Have the class you want to share implement that interface and inherit System.MarshalByRefObject or be [Serializable]. Then from application with the shared class, call RemotingServices.Marshal(mySharedClassInstance, ...) and have the other application call RemotingServices.Connect(...) which will return the shared object. Cast it to the interface your previously created and VOILA, you've just shared a class instance across application boundaries.
Any remotely useful information on my blog will be removed immediately. There are 10 kinds of people in the world. Those who have heard of the ubiquitous, overused, worn-out-like-an-old-shoe binary "joke" and those who haven't.
Judah Himango
|
|
|
|
|
See I want to make a bar that behaves like a splitter bar and yet leave no frames.For example I made a panel and dock it to the left.then a splitter bar docking to left.Then another panel dock set to fill.Now the problem is when i moved the splitter bar it leaves frames of itself(one trailing with the mouse and the other stayed back at the original position).But I don't want those frames.Is there any way to do this.
Thanks in advance.
just.starting...
|
|
|
|
|
Write your own splitter bar, or whenever the user is dragging the splitter, set the splitter position. FYI, there is a new splitter control in .NET 2.0 called a SplitContainer that supplants the current splitter control.
Any remotely useful information on my blog will be removed immediately. There are 10 kinds of people in the world. Those who have heard of the ubiquitous, overused, worn-out-like-an-old-shoe binary "joke" and those who haven't.
Judah Himango
|
|
|
|
|
Hi,
I'm using the P/Invoke mechanism to call an unmanaged C function, "CAPI_InitMaria", inside a 3rd party DLL. This function can be given a callback function, which is to be called during execution of CAPI_InitMaria.
Initially, this works fine: I can call the "CAPI_InitMaria" function from C#, after which the C# callback function (a delegate, see below) is called as well. Its argument (a GUID) also looks fine. However, after the callback method exits, I'm always getting an exception:
An unhandled exception of type 'System.NullReferenceException' occurred in MariaTestCSharp.exe
Additional information: Object reference not set to an instance of an object.
Doing the same in plain old C++ (VC++ 6.0) does not generate any problems. Also, if I specify 'null' instead of a callback function, everything works fine.
In C#, I call the CAPI_InitMaria function like this:
public class Form1 : System.Windows.Forms.Form
{
...
public delegate int OnStartCallback( ref Guid GUID );
private OnStartCallback myCallback;
[DllImport("Maria.dll")]
public static extern int CAPI_InitMaria( IntPtr hWndParent, IntPtr hResource,
OnStartCallback pInitFunction, int nFlags );
public static int OnStart( ref Guid GUID )
{
return 0;
}
private void initMaria_Click(object sender, System.EventArgs e)
{
System.Reflection.Module[] modules =
System.Reflection.Assembly.GetExecutingAssembly().GetModules(true);
instancePtr = Marshal.GetHINSTANCE( modules[0] );
myCallback = new OnStartCallback( OnStart );
CAPI_InitMaria( panel1.Handle, instancePtr, myCallback,
0x0004 );
}
...
}
The exported function and its associated callback types are declared like this in C++ (the procCAPI_InitMaria function is exported in the DLL as CAPI_InitMaria):
typedef int (*procCAPI_OnMariaStartup)( const GUID* pInstanceID );
typedef HWND(*procCAPI_InitMaria)( HWND hWndParent, HINSTANCE hResource,
procCAPI_OnMariaStartup pInitFunction, int nFlags );
Any ideas??
Thanks in advance,
Iwan Littel.
|
|
|
|
|
|
leppie, first of all thanks for your answer.
Regarding your solutions:
1) I already made the delegate instance static (see code in first post), so that solution didn't work
2) Currently, the delegate instance is stored inside a member variable of the Form1 class, which remains alive until the application shuts down. So wrapping the delegate instance in a GCHandle probably has no effect. Do you agree?
Thanks,
Iwan.
|
|
|
|
|
What leppie is referring to is the fact that the managed GC (garbage collector) can move things around, so that if your function calls your callback and it's moved, your unmanaged code (since it is unmanaged) does not know it and, most often, an AV (access violation) exception occurs, which bubbles up into the CLR which can throw a variety of exceptions.
Another problem that can occur is different calling conventions for functions. If that is the case, read one of my previous replies regarding that issue at http://www.codeproject.com/script/comments/forums.asp?msg=931771&forumid=1649#xx931771xx[^].
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
Heath, thanks for the reply.
I don't think my callback function is moved by the garbage collector, because it IS being called during the call to CAPI_InitMaria. The exception always occurs AFTER my callback function has been called and after it has exited successfully.
The calling convention issue was also my initial thought. However, I don't have any problems in VC++ (which uses the standard C++ calling convention). So I don't think I need to specify another calling convention in C#.
A colleague of mine came up with the following: It might be that the (3rd party) DLL we are calling starts up another thread, which calls the callback function (i.e. the C# delegate). Could this be the cause of the problem, and if so what could be done about it?
Thanks,
Iwan.
|
|
|
|