|
*The enum Equals can take two enum values
www.wickedorange.com
www.andrewvos.com
|
|
|
|
|
Since I haven't tried this before, are there any major problems with launching an external process from a BackgroundWorker thread?
Just thought I'd ask before I try and start pulling what little hair I have left.
Thanks in advance,
Steve.
|
|
|
|
|
that is the wrong order if you ask me.
first read the documentation and/or try; if you still have a problem, then ask and
the CodeProject will try and help you.
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips:
- before you ask a question here, search CodeProject, then Google;
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get;
- use PRE tags to preserve formatting when showing multi-line code snippets.
|
|
|
|
|
HI thompsons
what you means by the external process?
In my undestand, You are try start a notepad exe in same PC, is it?
is it correct ,can up external process.
|
|
|
|
|
Rule #1, try it!
No, there's no problem with doing that at all. A new process starts on it's own thread anyway, so it really doesn't matter which thread you start a new proc on.
|
|
|
|
|
To all:
Thanks for the reply.
My apologies for breaking rule #1; wasn't aware of it...
Regards,
Steve.
|
|
|
|
|
Hi, I've only taken 2 programming classes thus far so I am fairley new to it all (but I love it so far!). I made an application to take and store all my notes for all my different classes (college). The problem I am having is, I want to display a powerpoint and be able to navigate through it in either a webrowser or picturebox beside my richtextbox for my notes. Is there a simple way to do this? I've searched the web a lot and can't seam to find anything? Any help would be great! thanks
Rusty
|
|
|
|
|
You can control office through the microsoft tools for office ( or something like that ). You can't display a ppt on a machine that doesn't have powerpoint installed, but I'd expect you could perhaps do it through the libraries MS provides, on a machine that has it.
You definately cannot do it in a picturebox, if you can do it through a browser control, it's only because the browser itself knows how to open a powerpoint ( I'm not sure if it opens them embedded, like PDFs will open )
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
This is the header of my only function in my dll file and it compiles just fine
public static string SaveName(string strName)
and on the other hand in my class that implements the dll I have this:
[DllImport("MyBloodyDLL.dll", EntryPoint = "SaveName")]
public static extern string SaveName(string strName);
and when calling the SaveName("string") function later, I get this beautiful exception:
Unable to find an entry point named 'SaveName' in DLL 'MyBloodyDLL.dll
Please help
ps. I HATE DLLs!!
All generalizations are wrong, including this one!
(\ /)
(O.o)
(><)
modified on Wednesday, April 16, 2008 4:49 PM
|
|
|
|
|
strName!=SaveName
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips:
- before you ask a question here, search CodeProject, then Google;
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get;
- use PRE tags to preserve formatting when showing multi-line code snippets.
|
|
|
|
|
Luc Pattyn wrote: strName!=SaveName
Sorry Luc, I just made a mistake while pasting it, any idea what the problem is??
Thanks for helping mate!
All generalizations are wrong, including this one!
(\ /)
(O.o)
(><)
modified on Wednesday, April 16, 2008 4:54 PM
|
|
|
|
|
Hi Muammar,
if your target file is unmanaged C++ (as opposed to C) then the function names
would be mangled somehow. You could either try and find out what the rules are,
or use good old DUMPBIN to look at the exports of the DLL.
BTW: maybe just omitting the EntryPoint stuff solves it (just a guess).
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips:
- before you ask a question here, search CodeProject, then Google;
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get;
- use PRE tags to preserve formatting when showing multi-line code snippets.
|
|
|
|
|
Hey Luc,
Well, both files are written in C# "guess that's why i'm posting this in the C# forum "
Luc Pattyn wrote: maybe just omitting the EntryPoint stuff solves it
While I though adding it would solve the problem .. I just added it after the problem has occurred!
Anyways, thanks for helping Luc!
All generalizations are wrong, including this one!
(\ /)
(O.o)
(><)
|
|
|
|
|
Hi Muammar,
if you have a managed EXE/DLL calling unmanaged code in a DLL, then and only then you
need the DllImport and the static external stuff (on the managed side), and you must
worry about name mangling if the unmanaged code is C++.
if both parts are managed, you don't use DllImport, you don't use external.
You just use the type(s) from the DLL as if they are part of your EXE.
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips:
- before you ask a question here, search CodeProject, then Google;
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get;
- use PRE tags to preserve formatting when showing multi-line code snippets.
|
|
|
|
|
Hi Muammar©,
As you mentioned, it seems like the DLL you have is written in C# or .Net somehow, because as much as I know, working with string types is not as easy as C# in C and C++ and the Entry Point you mentioned makes me feel like the library you have is written in C# and in that case:
It you want to access the library at design time (coding time) you just need to add it to your project as a reference and use it by adding it's main namespace to your code, using the "using" keyword and then you can easily access the method you like.
But if you want to access it at runtime (directly from your compiled code) you need to know about the System.Reflection namespace and much more to use the classes inside it. You can find what you need on MSDN and google.
Good luck and have fun.
Sojaner!
|
|
|
|
|
Hello,
I encountered strange situation. Let's say we have a code like this:
<br />
string s = "123abc456";<br />
s.Remove(3, 3);<br />
Console.WriteLine(s);<br />
and the printed result is: 123abc456
I wonder why?
Thank you,
Dj_Lord
Dj_Lord
|
|
|
|
|
Because string.Remove returns a string. Change it to
s = s.Remove(3, 3); and please change the variable to a meaningful name; s just sucks.
|
|
|
|
|
Strings are immutable ( you can't change the value of a string, you can only generate a new string with a changed value ). So, ALL methods like substring, remove, replace, all return a new string with the changed value.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi
When play with string
you must override the string by your change string variable.
what I'm saying
s=s.Remove(3,3);
|
|
|
|
|
|
Override means
for example
string name = string.Empty;
name = "codeproject";
name = name.Remove(2,3);
Console.WriteLine(name);
output:coroject
|
|
|
|
|
I think you meant "overwrite"...
Oh well, semantics schmantics...
|
|
|
|
|
I have posted a sample for your references.
please check that.
|
|
|
|
|
No, that's creating a new instance of an immutable object.
Override has nothing to do with that.
|
|
|
|
|
I found this: http://www.codeproject.com/KB/IP/ListNetworkComputers.aspx on CP but it doesn't work with Mono in Ubuntu (I get a DllNotFoundException). I know there is the static method in the Dns class GetHostEntry (string ip_address) but sometimes it doesn't get the hostname of computers that are on. Is there some other way to get all the hostnames in a network without using an external dll?
I know I can use the code that was used in the mentionned article on Windows computers, but I'd like a method that work work in Ubuntu as well.
|
|
|
|