|
Why not ? Are they both the same named COM object ? Then you may have to do it via a dll, and have one for each version, perhaps.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Yes, it appears that you can only have one or the other.
I tried saving the dll's in my project folder and then adding references to the dll's and that doesn't seem to work the same as actually adding the the COM tool.
If the current version of the com tool is 6.0 and and I try to browse to the 7.0 version and select it, the original is now replaced.
|
|
|
|
|
The nature of COM is such that - if developers follow the rules - you should import the 6.0 library and that would work for the 7.0 library as well. Since interfaces should never be changed (though some, like Microsoft Office, only add to existing dispatch interfaces since automation clients can only use one default dispatch interface) they are still typically implemented so that you can do what you need. Now, if you require calling into 7.0-specific functionality in your client then you should cast to 7.0 interfaces. If null is returned then you're dealing with 6.0 and you won't be able to call into the 7.0 functionality.
The same goes for Office (using basic PIAs, not, say, Visual Studio for the Office System): use the oldest typelib you can tolerate in your app to generate the PIAs. Using them should work going forward (unless some day long, long down the line some older functionality is deprecated but then you should just not get the result you were expecting as opposed to a runtime error).
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Customer Product-lifecycle Experience
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
The customize toolbox com components will contain only 1 adobe acrobat browser control.
the files( dll's ) created when you move the control to a form are different from version 6 to version 7.
Are you saying that I can just add a reference to the dll's for version 7.0 and somehow cast the version 6 class as a version 7?
|
|
|
|
|
No, actually you create an interop assembly from version 6, which means you may have to uninstall 7.0 and install 6.0 to create one, or do this on a separate machine, or just extract the ActiveX server or separate type library (if there is one, a .tlb file) and run tlbimp.exe on it.
If you use the 7.0 library the default class interface - depending on whether they create new interfaces per-version or add to the existing default dispatch interface - then where 6.0 is installed it may not work. The referse should hold true, however. This is how COM is designed to work in terms of versioning interfaces.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Customer Product-lifecycle Experience
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
somebody have "Professional C# 2005" book in fdf format.
Please
help me.
Mi nombre es Renier Jorge Telles
Soy estudiantes de informatica y estoy interaso en compartir con ustedes conocimientos y dudas de esta rama.
|
|
|
|
|
Hi there. Welcome to this site. Most of us are professional developers. Which means we work for a living. Some of us write books. Which means we work harder than we should have to in order to make a few bob. Which means we won't send a pdf off to some scumbag who is not willing to pay us for the work that we do.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Don't hold back, Christian, tell him what you really think!
Matt Gerrans
|
|
|
|
|
Seriously, of all the people in the world who steal intellectual property, developers are the group that make the least sense to me.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Actually, it is kind of interesting -- In my experience the higher the quality of the developer, the less likely they are to steal. I wonder if there is some link between competence and integrity? I guess that was often Ain Rand's thesis.
(or, maybe -- and more likely -- my experience doesn't amount to anything of statistical significance)
Matt Gerrans
|
|
|
|
|
This guy has been emailing me all morning trying to justify his position. Which proves in my mind, even he knows it's wrong.
Wrox books are crap, anyhow.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
While I can see where you are "coming from", and agree with your statement. There's no need to be hostile about it. Calling people a scumbag takes validity out of your argument.
I do think that not everyone has the resources to buy every book that comes out just because one chapter will be of use to them. I've seen guys in my college that barely have the money to eat. They are poor and manage to be in college with scholarships. Really brilliant people! Should they be denied the oportunity to learn? Not, in my opinion. If there's a case where a professor recommends a particular chapter from an additional book as a reference, I've bought it, and they have a real need, I will lend it to them. Dont take me wrong, you shouldnt be denied your right to eat and provide for your family either.
That problem could be solved to some extent if publishers allowed customers to buy excerpts from the book instead of forcing you to buy a whole book for a single useful chapter or two. Because a person could spend perhaps $7 for the part of the book he needs, instead of simply not buying the book, and downloading it off the net. But then again, letting you buy parts of the book would require them to recognize that not everything they publish is useful. And not all authors want to believe that.
-- modified at 20:55 Monday 7th November, 2005
|
|
|
|
|
azazel00 wrote: There's no need to be hostile about it.
Perhaps. But the fact is, he is a thief. I wanted to highlight that this is as true if he downloads a pdf as if he steals a paper book.
azazel00 wrote: I do think that not everyone has the resources to buy every book that comes out just because one chapter will be of use to them.
That's true. Those people should look into subscribing to Safari or something, or making do without.
azazel00 wrote: Should they be denied the oportunity to learn?
No. I guarentee you that the book in question teaches nothing that cannot be learned online.
azazel00 wrote: That problem could be solved to some extent if publishers allowed customers to buy excerpts from the book instead of forcing you to buy a whole book for a single useful chapter or two.
Sort of an iTunes model ? That could work, and I'm sure it will come into being. I'm also pretty sure that the web has hurt book sales a lot.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I have to agree with Christian. This guy has been openly and blatantly asking for a pyrated copy of this book for days. Its even worse if he has been emailing Christian trying to justify his position. People who don't even try to do it underhandedly are scumbags, in the truest sense of the word. They apparently have no qualms about steeling, despite the fact that it is WRONG. The proliferation of steeling only serves to keep the poor poor, and make those who work hard for their money have to work harder. Plain and simple, yes, this guy is a theif, and if he doesn't realize that (which seems doubtful in light if is attempts at justification), a sharp wakeup call is certainly acceptable.
|
|
|
|
|
Ah yes, the "it's okay to steal if you are poor argument" followed by the "it's okay to steal if the product isn't offered in the style you'd like" (or is that, "really, I would pay for it if it were packaged differently").
There are people with integrity and very little money -- they won't steal.
Then there are with very little integrity, rich and poor alike -- they'll steal left and right and they'll always have lots of "reasons" why it is okay or why in this case it isn't really stealing.
Matt Gerrans
|
|
|
|
|
I never said it was ok to steal if you are poor. I said that I've seen people who dont have the resources and I have no problem sharing/lending the stuff I've bought so that they can get the information they need. Nothing wrong with that, IMHO. If I want to trash, lend, or give my book as a gift to a fellow student, it's my book and my spent money. Hell, I could even make my apartment a public library if i wanted to and allow anyone to come here and read from my collection of reference books.
I never said that I condone stealing it if it not packaged or styled int he way I like, either. I said that publishers could avoid losses if they were more flexible in providing options to the consumers. For example, pay on a what-you-read basis.
"There are people with integrity and very little money -- they won't steal." <--- True, but totally off the point.
I'd suggest actually reading what I said again.
Wonder if there's a direct relationship between "programmers" and not being able to extract non-technical data from verbose text.
azazel
|
|
|
|
|
somebady can tell me how to do a Qeue in c#
thank you
Mi nombre es Renier Jorge Telles
Soy estudiantes de informatica y estoy interaso en compartir con ustedes conocimientos y dudas de esta rama.
|
|
|
|
|
A queue of int:
System.Collections.Generic.Queue<int>
or the old way
System.Collections.Queue.
Or do you mean you want to write your own ? This is a terrible idea, unless it's for learning purposes only, in which case, you should use google, it's not a C# question, but a general computer science one, and there's plenty of info to be had. This forum is more for answering questions when you get stuck than for giving a complete solution to a question like that one.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Somebady cant send me a simple example of a template in c#?
in c++ for example is :
template <type>
class example
{
//fields------------
private:
type element;
public:
void SetElement(type _element);
};
Now ,How i can do it in c#.
thank you.
Mi nombre es Renier Jorge Telles
Soy estudiantes de informatica y estoy interaso en compartir con ustedes conocimientos y dudas de esta rama.
|
|
|
|
|
First, check 'Ignore HTML tags in this message (good for code snippets)' below so we can see your template.
In C#, it's something like:
public class example<type>
{
//fields------------
private type element;
public void SetElement(type _element)
{
element = _element;
}
};
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Your example in C# 2.0
public class Example<T>
{
private <T> element;
public void SetElement(<T> element)
{
}
}
This feature is not available in 1.0 and 1.1
Does this help?
My: Blog | Photos
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucious
|
|
|
|
|
I just realised you'd asked this twice. I assumed that you knew that you need VS2005 to have generics in C#, but given that you asked the same question again, perhaps you don't ? If you have VS2002 or 2003, there are no generics.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
How do I add a reference to an assembly that is in the GAC (C:\Windows\Assembly) folder? The problem is that I use a third party dll that is register in GAC but not available elsewhere in my hard drive. So I have to use the copy in the GAC folder.
Any suggestions would be appreciated.
Thanks,
Sandeep.
|
|
|
|
|
If it's registered in the GAC, I believe you have to use that assembly. Trying to use a non-GAC registered copy caused an error.
|
|
|
|
|
Yes but the problem is how to add the reference to that assembly??
|
|
|
|